-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
52 lines (40 loc) · 1.55 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
AddDefaultCharset utf-8
php_value default_charset UTF-8
php_value mbstring.internal_encoding UFT-8
php_value mbstring.http_output UTF-8
php_value mbstring.encoding_translation On
php_value mbstring.func_overload 6
php_value max_execution_time 0
## Set up mod_rewrite
<IfModule mod_rewrite.c>
Options +MultiViews +FollowSymLinks
DirectoryIndex index.php index.html
# Enable Rewrite Engine
# ------------------------------
RewriteEngine On
# UPDATE THIS TO POINT TO where you installed this FROM YOUR DOC ROOT.
# If this is in the DOC ROOT, leave it as it is
#---------------------
RewriteBase /
# In case your hosting service doesn't add or remove 'www.' for you, you can
# do it here by uncommenting and updating the 'Rewrite*'s below.
#
# Add or remove 'www.' Whichever you prefer.
# This one removes the 'www.' which seems to be the favorable choice these days.
# ------------------------------
#RewriteCond %{HTTP_HOST} ^www.<sitename>.com
#RewriteRule (.*) http://<sitename>.com/$1 [R=301,L]
# Redirect index.php Requests
# ------------------------------
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteCond %{THE_REQUEST} !/system/.*
RewriteRule (.*?)index\.php/*(.*) $1$2 [R=301,L]
# Standard ExpressionEngine Rewrite
# ------------------------------
RewriteRule modules/(.+)/controllers/(.+)\.php$ /index.php?/$1/$2 [L,R=301]
RewriteRule controllers/(.+)\.php$ /index.php?/$1 [L,R=301]
RewriteCond $1 !\.(css|js|gif|jpe?g|png) [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>