forked from copona/copona
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess.example
40 lines (32 loc) · 1.25 KB
/
.htaccess.example
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
# To use URL Alias you need to be running apache with mod_rewrite enabled.
Options +FollowSymlinks
# Prevent Directory listing
Options -Indexes
# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|\.ini|\.yml|\.xml|\.log|\.gitignore|\.json|\.md|\.lock|\.dist(?<!robots)\.txt))">
Order deny,allow
Deny from all
</FilesMatch>
<Files sitemap.xml>
Allow from all
Satisfy all
</Files>
# SEO URL Settings
RewriteEngine On
##
## Black list protected files
##
RewriteRule ^config/.* index.php?route=error/not_found [L]
RewriteRule ^vendor/.* index.php?route=error/not_found [L]
RewriteRule ^migrations/.* index.php?route=error/not_found [L]
RewriteRule ^storage/private/.* index.php?route=error/not_found [L]
RewriteRule ^.env index.php?route=error/not_found [L]
RewriteCond %{REQUEST_URI} !\.(css|png|jpg|jpeg|gif|bmp|tiff|svg)$
RewriteRule ^storage/.* index.php [L,NC]
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^storage/download/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]