rewrite and environment variables

New to mod_rewrite? This is a good place to start.

rewrite and environment variables

Postby blaise » Sun Sep 01, 2002 12:05 pm

I'm confused as to the setting of environment vars with mod_rewrite rules; it seems that the var that gets set is not the correct variable. :(

Here's relevant info:
----------- .htaccess --------------
RewriteBase /~robinkir
RewriteRule ^(.*)/([^:/]+):([^/]*)/(.*) $1/$2 [E=$2:$3]
RewriteRule ([^:/]+):([^/]*)/(.*) $3 [E=$1:$2]
------------------------------------

When requesting /~robinkir/FOO:bar/ the variable REDIRECT_FOO gets set, and not FOO. When requesting /~robinkir/FOO:bar/blah:blah2/ the variable REDIRECT_REDIRECT_FOO and REDIRECT_REDIRECT_blah get set, but still no FOO or blah variable.

Could someone explain what the heck si going on here?
Reference URL:
http://rkirkman.campus.vt.edu/~robinkir/it.pl

Fool with it like: /~robinkir/foo:bar/quux:biznor/it.pl
blaise
 

Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 9 guests

cron