REDIRECT_URL not correctly set in $_SERVER

Problems with the Linux version of XAMPP, questions, comments, and anything related.

REDIRECT_URL not correctly set in $_SERVER

Postby dfleury » 22. August 2011 20:05

Hi all,

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&param1=$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_QUERY_STRING action=actionId1&param1=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
Posts: 1
Joined: 22. August 2011 19:41

Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 4 guests