- Joined
- Nov 6, 2012
- Messages
- 2,230
- Reaction score
- 314
Hi,
I have a problem with my .htaccess file. It's removing .html extensions fine, how ever I can't get it to remove .php extensions from links. For example, instead of going to siteurl.com/client/order.php I want it to be siteurl.com/client/order
This is what I have in my .htaccess file;
But sadly it's not quite working. It worked fine on the old server I hosted my site on, how ever it's not quite working on my new one. Anyone have any ideas?
I have a problem with my .htaccess file. It's removing .html extensions fine, how ever I can't get it to remove .php extensions from links. For example, instead of going to siteurl.com/client/order.php I want it to be siteurl.com/client/order
This is what I have in my .htaccess file;
PHP:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php
But sadly it's not quite working. It worked fine on the old server I hosted my site on, how ever it's not quite working on my new one. Anyone have any ideas?