-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.htaccess
29 lines (24 loc) · 1.11 KB
/
.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
27
28
29
RewriteEngine on
# Eliminate www subdomain
RewriteCond %{HTTP_HOST} ^www [NC]
RewriteRule ^(.*)$ http://adventure-php-framework.org/$1 [R=301,L]
# enforce HTTPS
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
# English page shortcut
RewriteCond %{REQUEST_URI} ^/en$ [NC]
RewriteRule .* /Page/001-Home [R=301,NC,L]
# Rewrite all traffic to main page except forum, tracker, and wiki.
# DEV only:
RewriteCond %{REQUEST_URI} !setup_wizard\.php [NC]
#
RewriteCond %{REQUEST_URI} !(robots\.txt|sitemap\.xml|google0530241f73e9cc6c\.html|google5d5e6e05ed6af3ff\.html)$ [NC]
RewriteCond %{REQUEST_URI} !^/media [NC]
RewriteCond %{REQUEST_URI} !^/files [NC]
RewriteCond %{REQUEST_URI} !^/forum [NC]
RewriteCond %{REQUEST_URI} !^/wiki [NC]
RewriteCond %{REQUEST_URI} !^/tracker [NC]
RewriteCond %{REQUEST_URI} !/index\.php$ [NC] # exclude self to avoid enless loops
RewriteCond %{REQUEST_URI} !/favicon\.ico [NC]
RewriteRule .* /www/index.php?apf-rewritten-query=%{REQUEST_URI}&%{QUERY_STRING} [NC,L]
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript