I can’t seem to pass a ‘+’ symbol to a php file (index.php), even though I’m escaping it properly. To debug the problem I set up a test file (test.php).
I’m using mod_rewrite with the file that doesn’t work so that might be related.
Calling /test.php?z=1%2B2 I get:
["z"]=> string(3) "1+2"
Calling /1%2B2 I get:
["z"]=> string(3) "1 2"
The .htaccess file redirects the last line to index.php. It contains the following:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mywebsite.com$ [NC]
RewriteRule ^(.*)$ http://www.mywebsite.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^index\.php
RewriteRule ^.* index.php?z=%{REQUEST_URI}
php_flag magic_quotes_gpc Off
php_flag display_errors Off
AddHandler php5-script .php
Any ideas?
http://httpd.apache.org/docs/2.3/rewrite/flags.html#flag_b:
Works fine on my test machine with
but haven’t tested it with
%{REQUEST_URI}…