I have a switch on index.php, which listens to ?action=
I would like to rewrite anything after index.php/ to index.php?action=
Currently I have a rule to remove index.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}/$1\.php -f [NC]
RewriteRule ^(.+?)/?$ /$1.php [L]
So a current url looks like;
localhost:8888/?action=viewBasket
and would like to rewrite it to;
localhost:8888/viewBasket
Im getting confused as to wether I need to create a condition for each switch param, so to prevent images, script, sources etc from being rewritten. Or if there is a condition to check if exisits first. Cheers!