All of my pages end in .php, I need these pages to still be able to run PHP even though the extension has changed in the url bar. I want a page like
website.com/page.php
To
website.com/page
I have looked at half a dozen work arounds to this problem but none of them seem to work. Here are some examples.
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [L, QSA]
RewriteEngine On
RewriteRule \/([^\/]+)\/$ $1.php
# once per htaccess file
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z0-9-_]+)/?$ /$1.php
RewriteCond %{REQUEST_URI} !^/shopName1.php$
RewriteRule ^([a-z0-9-_]+).php$ /$1/ [R]
RewriteRule ^shops/shopName1/?$ /shopName1.php
RewriteRule ^shopName1.php$ /shops/shopName1/ [R]