I am trying to play with rewrite rule and i am experiencing something strange with the REDIRECT_* variables. I have the following in my .htaccess
- Code: Select all
RewriteEngine On
RewriteRule segment1/(\d+)/segment3 testrule.php?action=actionId1¶m1=$1 [L]
when i launch the following url: localhost/rewriteRuleTest/segment1/11/segment3 i expect apache to do an internal redirection, which it does with the following values set in the php $_SERVER variable:
REDIRECT_STATUS 200
REDIRECT_QUERY_STRING action=actionId1¶m1=33
REDIRECT_URL /rewriteRuleTest/segment1/33/segment3
REQUEST_URI /rewriteRuleTest/segment1/33/segment3
what i don't understand is why the REDIRECT_URL is set to /rewriteRuleTest/segment1/33/segment3 and not /rewriteRuleTest/testrule.php?
can someone explain what am i missing here?
My xampp version is 1.7.4 installed on an opensuse 11.4