forked from ivantcholakov/starter-public-edition-4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
46 lines (33 loc) · 1.63 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
<IfModule mod_headers.c>
# Disable URL indexing by crawlers
Header set X-Robots-Tag "noindex, nofollow, noarchive"
</IfModule>
<IfModule mod_rewrite.c>
#Options +FollowSymlinks
#Options +SymLinksIfOwnerMatch
RewriteEngine On
DirectoryIndex index.php index.html
#RewriteBase /
# Asset loader: When file not exists on local application "assets" folder,
# it is tried to be loaded from the common "assets" folder.
RewriteCond %{REQUEST_URI} /assets/
RewriteCond %{REQUEST_URI} \.(js|css|less|gif|bmp|ico|jpg|jpeg|jpe|mov|qt|mp3|xml|mp4|m4v|mpeg|mpg|pdf|png|swf|tif|tiff|wav|wma|wri|zip|eot|svg|ttf|woff|woff2|lang)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^assets/(.*) ../assets/$1 [L,QSA]
# Search favorite icons at the upper directory if not found at the current.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)favicon\.ico$ $1../favicon\.ico [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)apple-touch-icon\.png$ $1../apple-touch-icon\.png [L]
# Remove index.php segment from the URL.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !\.php$
RewriteCond $1 !^(index\.php|robots\.txt|favicon\.ico|apple-touch-icon-precomposed\.png)
# Modified by Ivan Tcholakov, 23-OCT-2014.
# Avoiding "No input file specified" error.
# See http://expressionengine.stackexchange.com/questions/11672/no-input-file-specified-htaccess/13376#13376
#RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
RewriteRule ^(.*)$ ./index.php?/$1 [L,QSA]
#
</IfModule>