I am working on a script which heavily relies on reading variables from the URL to determine what to do and what to show. In order to make it more SEO friendly I have added the following URL rewriting to an .htaccess file in the root:
RewriteEngine On
RewriteCond %{THE_REQUEST} /index\.php\?p=(?!admin)(?!superadmin)((?![^&]*?edit)[^\s&]+) [NC]
RewriteCond %{THE_REQUEST} /index\.php\?p=([^\s&]+) [NC]
RewriteRule ^ /%1? [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/?$ index.php?p=$1 [L,QSA]
This completely removes the query string from the browser's address bar, however a lot in the script does not work anymore because the variables $_GET['var'] are now empty...
is there a way I can still read the contents of the variables that are being sent in the URLs?
Thanks