Rewrite_mod RewriteRule problem


I’m new when it comes to using rewrite_mod on apache, and I seem to be having a problem that should be easy to figure out, but I have no idea what’s going on.

I’m in a directory and I want to rewrite all requests for a sub-directory to a php script. So gets rewritten to

What I came up with is this (assume RewriteEngine on):

rewriteRule ^(.*) /script.php?var=$1 [L]

But that returns a 500 internal error. What’s weird is if I try

rewriteRule ^test/(.*) /script.php?var=$1 [L]

and give the server a request for it works. Why does it work for one and not the other? Thanks.


[quote]rewriteRule ^(.*) /script.php?var=$1 [L]

But that returns a 500 internal error. [/quote]
Iteration - From Wikipedia, the free encyclopedia

:cool: -//- One-time [color=#6600CC]$50.00 discount[/color] on [color=#0000CC]DreamHost[/color] plans: Use ATROPOS7


RewritCond $1 !^script.php$
RewriteRule (.*) /script.php?var=$1 [L]