-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.htaccess
More file actions
45 lines (31 loc) · 1.18 KB
/
.htaccess
File metadata and controls
45 lines (31 loc) · 1.18 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
############################################
## Enable rewrites
Options +FollowSymlinks -MultiViews
RewriteEngine On
############################################
## Rewrite everything to www
# RewriteCond %{HTTP_HOST} ^domain.com
# RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
############################################
## Disable TRACE and TRACK to prevent XSS
RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
RewriteRule .* - [L,R=405]
############################################
## Always send 404 on missing files in these folders
RewriteCond %{REQUEST_URI} !^/(media|skin|js)/
############################################
## Never rewrite for existing files, directories and links
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
############################################
## Rewrite everything else to index.php
RewriteRule .* /index.php [L]
############################################
## Define error pages
# ErrorDocument 400 /error/400.html
# ErrorDocument 403 /error/403.html
# ErrorDocument 404 /error/404.html
# ErrorDocument 500 /error/500.html
############################################
## 301 Redirects for old pages