forked from TheDoer/Chiremba
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
79 lines (60 loc) · 2.67 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#Do not remove this line, otherwise mod_rewrite rules will stop working from www.000webhost.com
#RewriteBase /
<IfModule mod_rewrite.c>
#Turn on Apache mod_rewrite
RewriteEngine On
#Deny All Access
#Deny from all
# sets the default controller to "index"
#RewriteRule ^(index(/index)?|index(\.php)?)/?$ / [L,R=301]
#RewriteRule ^(.*)/index/?$ $1 [L,R=301]
#???? i realy dont know what the heck this does!!!
#RewriteCond $1 !^(index\.php|images|robots\.txt)
#RewriteRule ^(.*)$ /index.php/$1 [L]
#if its not a directory, file or link its all diverted to index.php
#RewriteCond %{REQUEST_FILENAME} !=d
#RewriteCond %{REQUEST_FILENAME} !=f
#RewriteCond %{REQUEST_FILENAME} !=l
#RewriteCond $1 !^(image|js|css|robots\.txt)
#RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
#What to be ignored when redirecting
#ignore a directory
#RewriteCond %{REQUEST_URI} !(public|css)
#ignore these file extensions
RewriteCond %{REQUEST_URI} !^(.*\.css|.*\.js|.*\.png|.*\.jpg|.*\.gif|robots\.txt)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php?params=$1 [L,QSA]
#removes the index.php from the url before specifying the controller name
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
# Removes trailing slashes (prevents SEO duplicate content issues)
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ $1 [L,R=301]
# Enforce www
# If you have subdomains, you can add them to
# the list using the "|" (OR) regex operator
#RewriteCond %{HTTP_HOST} !^(www|subdomain) [NC]
#RewriteRule ^(.*)$ http://www.domain.tld/$1 [L,R=301]
# Enforce NO www
#RewriteCond %{HTTP_HOST} ^www [NC]
#RewriteRule ^(.*)$ http://domain.tld/$1 [L,R=301]
# Removes access to the system folder by users.
# Additionally this will allow you to create a System.php controller,
# previously this would not have been possible.
# 'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
# Checks to see if the user is attempting to access a valid file,
# such as an image or css document, if this isn't true it sends the
# request to index.php
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
# Without mod_rewrite, route 404's to the front controller
ErrorDocument 404 /index.php
</IfModule>