I have an htaccess that redirects any url except urls in 3 specific folders to a php file which handles displaying the page:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/app [NC]
RewriteCond %{REQUEST_URI} !^/templates [NC]
RewriteCond %{REQUEST_URI} !^/downloads [NC]
RewriteCond %{THE_REQUEST} \ /+([^\ \?]*)
RewriteRule (.*)$ ./app/index.php?url=%1 [L,B]
The problem is, however, any query info in the url is lost. I was wondering if it would be possible to retain that.
for example:
mysite.com/test?page=1 would become /app/index.php?page=1&url=test
rather than (Which is what happens now):
mysite.com/test?page=1 becomes /app/index.php?url=test