Posted By

lixonic on 09/01/10


Tagged

htaccess


Versions (?)

Who likes this?

5 people have marked this snippet as a favorite

tre
lixonic
vkolev
czterystaczwarty
bolven


Hide file extensions with htaccess


 / Published in: Apache
 

  1. RewriteCond %{REQUEST_FILENAME} !-d
  2. RewriteCond %{REQUEST_FILENAME}\.php -f
  3. RewriteRule ^(.*)$ $1.php
  4.  
  5. RewriteCond %{REQUEST_FILENAME} !-d
  6. RewriteCond %{REQUEST_FILENAME}\.html-f
  7. RewriteRule ^(.*)$ $1.html

Report this snippet  

You need to login to post a comment.