-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
executable file
·61 lines (49 loc) · 1.97 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# -- NSM .htaccess Generator Start --
# .htaccess generated by NSM .htaccess Generator v1.1.6
# @see: http://ee-garage.com/nsm-htaccess-generator
# For more awesome .htaccess rules and optimisations
# checkout the HTML5 Boilerplate .htaccess files
# https://github.com/paulirish/html5-boilerplate/blob/master/.htaccess
# Although highly unlikely, your host may have +FollowSymLinks enabled at the root level,
# yet disallow its addition in .htaccess; in which case,
# adding +FollowSymLinks will break your setup (probably a 500 error),
# so just remove it, and your rules should work fine.
Options +FollowSymlinks
# EE 404 page for missing pages
ErrorDocument 404 /index.php/
# Simple 404 for missing files
<FilesMatch "(\.jpe?g|gif|png|bmp|css|js|flv)$">
ErrorDocument 404 "File Not Found"
</FilesMatch>
# Rewriting will likely already be on, uncomment if it isnt
# <IfModule mod_rewrite.c>
# RewriteEngine On
# RewriteBase /
# </IfModule>
# Block access to "hidden" directories whose names begin with a period. This
# includes directories used by version control systems such as Subversion or Git.
<IfModule mod_rewrite.c>
RewriteRule "(^|/)\." - [F]
</IfModule>
# remove the www - Uncomment to activate
<IfModule mod_rewrite.c>
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
</IfModule>
# Remove the trailing slash to paths without an extension
# Uncomment to activate
# <IfModule mod_rewrite.c>
# RewriteRule ^(.*)/$ /$1 [R=301,L]
# </IfModule>
# Remove index.php
# Uses the "include method"
# http://expressionengine.com/wiki/Remove_index.php_From_URLs/#Include_List_Method
# <IfModule mod_rewrite.c>
RewriteCond %{QUERY_STRING} !^(ACT=.*)$ [NC]
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5})$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/(content|includes|project|members|P[0-9]{2,8}) [NC]
RewriteRule (.*) /index.php/$1 [L]
# -- NSM .htaccess Generator End --