-3

I'm Developing one website and want to remove the extensions from my website s7info in order to make the URLs more user and search friendly. I stumbled across tutorials on how to remove the .php extension from a PHP page. What about the .html? i want to remove those as well..!!

1 Answers1

1

try this,

.htacess file

<IfModule mod_rewrite.c>
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php
#RewriteRule ^([a-z]+)\/?$ $1.php [NC]


RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html
#RewriteRule ^([a-z]+)\/?$ $1.html [NC]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.htm -f
RewriteRule ^(.*)$ $1.htm
#RewriteRule ^([a-z]+)\/?$ $1.htm [NC]

</IfModule>
Dave
  • 3,073
  • 7
  • 20
  • 33