I know these rewrite rules questions are all over StackOverflow – and I’ve read all of them. I’ve tested my htaccess code on http://htaccess.madewithlove.be/ and it comes back as working.
But on my site it doesn’t work.
Here’s the code(currently on the site under the /new/ folder):
Options +FollowSymLinks
RewriteEngine On
RewriteBase /new
RewriteCond %{REQUEST_URI} !\.php$ [NC]
RewriteCond %{REQUEST_URI} [^/]$
RewriteRule ^(.*)$ $1.php
Here’s the site:
http://strattonindustrial.com/new/property/page
I want the /page/ to redirect to /page.php in the background, but show the /page/ in the URL, but it gives me a 404 page, so no redirecting is happening. I’m basically trying to remove the “.php” from the file name and make it SEO friendly.
Additionally, I’ve called Godaddy and checked to make sure mod_rewrite is loaded and turned on. They can’t find anything on their end that isn’t working.
So it must be something with my code, but FOR THE LIFE OF ME I can’t figure it out.
Here is the code that you need: