View Single Post
Old 05-02-2010, 07:30 PM  
tonyparra
Confirmed User
 
tonyparra's Avatar
 
Industry Role:
Join Date: Jul 2008
Location: In your back seat with duck tape
Posts: 4,568
Quote:
Originally Posted by fris View Post
this will check to make sure a .html file doesnt exist already

http://www.domain.com/site.php will work as
http://www.domain.com/site.html

as well as dirs

http://www.domain.com/directory/sammy.php will work as
http://www.domain.com/directory/sammy.html

Code:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^(/.+\.)html$ [NC]
RewriteCond %{DOCUMENT_ROOT}%1php -f
RewriteRule \.html$ %1php [NC,QSA,L]
you sir are a scholar and a gentleman will try now and report
__________________

High Performance Vps $10 Linode
Manage your Digital Ocean, Linode, or Favorite Cloud Server. Simple, fast, and secure Server Pilot
tonyparra is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote