I'm using Ionics Isapi Rewrite Filter on an older server and need to rewrite some URL's...
My current rules are:
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L,QSA]
And this works for URL's like http://www.my-site.co.uk/login, http://www.my-site.co.uk/contact
But, if I have http://www.my-site.co.uk/login?result=fail (for example), then I just get a 404 response.
I was initially missing the 'QSA', but adding it didn't help.
I've tried:
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^([^\.]+)$ $1.php?%1 [NC,L,QSA]
(from htaccess remove .php and keep query string), and various combinations of:
RewriteCond %{REQUEST_FILENAME}.php -f
But without success. I've been through most of the suggestions on StackOverflow, none of them appear to work. Does anyone have any ideas?