I have a relatively simple htaccess redirect that redirects all urls to a php file designed to handle urls with the exception of 3 specific directories:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/system [NC]
RewriteCond %{REQUEST_URI} !^/assets [NC]
RewriteCond %{REQUEST_URI} !^/downloads [NC]
RewriteRule (.*)$ ./system/page.php?url=$1
And it works great... almost. For normal characters it works great but as soon as I introduce special characters that have been url encoded it seems to struggle a bit and I have no idea why.
In page.php I have a simple line of code to display the url:
echo $_GET['url'];
The following is echoed out from these various urls:
mydomain.com/test -> echos "test" (which is correct)
mydomain.com/tt%23tt -> echos "tt" (the desired echo would be tt%23tt)
mydomain.com/tt%25tt -> echos "tt%tt" (the desired echo would be tt%25tt)
Basically I am trying to get the string exactly as it appears in the url and let php handle it from there but I'm pretty terrible at htaccess.
Any help would be great, thanks!