Skip to content

Commit

Permalink
htaccess for missing .html
Browse files Browse the repository at this point in the history
  • Loading branch information
remy committed Feb 3, 2010
1 parent bab5d18 commit c011114
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<IfModule mod_rewrite.c>
Options +FollowSymLinks +ExecCGI
RewriteEngine On
RewriteBase /

# no-www.org
RewriteCond %{HTTP_HOST} ^www\.html5demos\.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www\.html5demo\.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^html5demo\.com$ [NC]
RewriteRule ^(.*)$ http://html5demos.com/$1 [R=301,L]

# if the file or directory does exist
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .* - [L]

RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule (.*) $1.html [L]

</IfModule>

0 comments on commit c011114

Please sign in to comment.