Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting rid of file extensions such as .html and .php
#3
.htaccess files have nothing to do with php, they're control modules for apache.

The
Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php

Should really be all you need for most cases. It doesn't have to be in an .htaccess file either, you can put it directly in your httpd.conf at any level if you want it to effect all sites, or site wide to a specific site regardless of folder depth. htaccess files are overrides to the default conf.
It's not having what you want - It's wanting what you've got.
Reply


Messages In This Thread
Getting rid of file extensions such as .html and .php - by Eos - 2013-10-09, 11:42 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)