forked from remy/html5demos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
26 lines (20 loc) · 754 Bytes
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<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]
# RewriteCond %{HTTP_REFERER} ^$ [OR]
# RewriteCond %{HTTP_REFERER} !^http://(www\.|offline\.)?html5demos.com/.*$
# RewriteRule \.(gif|jpg|swf|flv|png|ogv|mp4|webm|js)$ [R=404,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 [QSA,L]
RewriteRule ^(.*)$ page.php [QSA,L]
</IfModule>