I am trying to rewrite links with .htaccess file. Basic stuff, but for some reason it does not work. I need the name of the file, before .php to be the last word in URL. What am I missing here?
RewriteRule ^/product/(.*)$ /incl/static/products/$1.php [NC,L]
as
Marcsaid you need something to distinguish the script file name and other parts:But if after first (.*) is query string , so use it: