mirror of
https://github.com/Erreur32/html5demos.git
synced 2024-09-27 22:31:28 +02:00
htaccess for missing .html
This commit is contained in:
parent
bab5d18fa4
commit
c011114051
20
.htaccess
Normal file
20
.htaccess
Normal file
@ -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>
|
Loading…
Reference in New Issue
Block a user