-
Notifications
You must be signed in to change notification settings - Fork 111
/
Copy path.htaccess
45 lines (34 loc) · 1.24 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
addDefaultCharset utf-8
<IfModule mod_headers.c>
Header set X-UA-Compatible "chrome=1"
</IfModule>
Options -Indexes
RewriteEngine on
# Force www
# RewriteCond %{HTTP_HOST} !^www\.
# RewriteCond %{HTTP_HOST} !^localhost
# RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
# favicon always at same place!
RewriteCond $0 !=img/favicon.ico
RewriteRule ^([^/]+/)*favicon\.ico$ /img/favicon.ico [L]
# Move /dataclean to /datajanitor
RewriteRule ^dataclean/(.+) /datajanitor/$1 [R=301,L]
RewriteRule ^dataclean$ /datajanitor [R=301,L]
# Removes access to the system folder by users.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
# Removes access to the application folder by users.
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php/$1 [L]
# Remove access to git stuff
RewriteRule ^(.*/)?\.git+ - [F,L]
ErrorDocument 403 "Access Forbidden"
# Remove access to README file
RewriteRule ^README.md [F,L]
ErrorDocument 403 "Access Forbidden"
# 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]