My .htaccess file looks like this:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)/$ ?action=$1 [QSA,L]
It works allright if i end all my urls with /. For example http://localhost/test/test2/test3/.
But if I forget to put / in the end, I get not found error… I’ve tried to tweak this rewrite rule but cant make it work both ways (with and without final /).
Any ideas?
Make it optional with the
?operator:… or simply remove completely, since you don’t seem to need it at all:
… or even: