Yes, I know this has been asked hundreds of times. But I just can't find a version that actually works. Currently, all the ones so far I've tried currently work in removing .php
, but that is when the problems begin. A few pages on my site depend on $_GET
requests, e.g profile
So when you go to the url http://www.example.com/profile?username=System you will get a 404, while without the ?username=System
it works fine. The current code I have is
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php