I hope someone can help me with this.
This is my .htaccess file:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
A URL like the following will successfully rewrite:
http://jobs2.local/main/out/16339404/http://www.google.com/
However if I encode the URL last part of the URL (the http://www.google.com/ part) I get a 404 error:
http://jobs2.local/main/out/16339404/http%3A%2F%2Fwww.google.com%2F
The culprit appears to be the %2F but I do not understand why this is happening.
Do any of you know what the problem is?
Thank you.
I figured this out.
The problem is Apache does not like %2F.
The solution is to add “AllowEncodedSlashes On” to the VirtualHost entry in httpd.conf for the website, e.g.
I have tested this and it works as expected.