-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess.example
54 lines (40 loc) · 2.01 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Don't show directory listings for URLs which map to a directory.
Options -Indexes
# Follow symbolic links in this directory.
Options +FollowSymLinks
# Set the default handler.
DirectoryIndex index.php
# Various rewrite rules.
RewriteEngine on
RewriteBase /
# give static content proper urls
RewriteRule ^/?static-\d+/(.*)/themes/(.*)$ /$1/themes/$2 [PT,L]
RewriteRule ^/?static-\d+/(.*)/assets/(.*)$ /$1/assets/$2 [PT,L]
# For the file manager
RewriteRule ^/?admin/scripts/filemanager.config.js$ /index.php?controller=admin\%5Cfile-manager&method=config [QSA,L]
RewriteRule ^/?admin/connectors/php/filemanager.php$ /index.php?controller=admin\%5Cfile-manager&method=rpc [QSA,L]
RewriteRule ^/?admin/scripts/filemanager.liveSearch.min.js$ /core/themes/default/packages/file_manager/filemanager.liveSearch.min.js [QSA,L]
RewriteRule ^/?admin/scripts/languages/en.js$ /core/themes/default/packages/file_manager/languages/en.js [QSA,L]
# For ckeditor
RewriteRule ^/?(static-\d+/)?core/themes/default/packages/ckeditor/config.js$ /core/themes/default/js/ckeditor_config.js [QSA,L]
# Allow access to static content
RewriteCond %{DOCUMENT_ROOT}/$1/themes/$2 -f
RewriteCond %{REQUEST_URI} !\.php$
RewriteRule ^(.*)/themes/(.*)$ $1/themes/$2 [PT,L]
RewriteCond %{DOCUMENT_ROOT}/$1/assets/$2 -f
RewriteCond %{REQUEST_URI} !\.php$
RewriteRule ^(.*)/assets/(.*)$ $1/assets/$2 [PT,L]
#
# Rewrite everthing else to index.php
#
RewriteRule ^/?admin/([^/]+)(/([^/]+))?(/(.*))?$ /index.php?controller=admin\%5C$1&method=$3¶ms=$5 [QSA,L]
RewriteRule ^/?customer/([^/]+)(/([^/]+))?(/(.*))?$ /index.php?controller=customer\%5C$1&method=$3¶ms=$5 [QSA,L]
# Avoid endless loop
RewriteCond %{REQUEST_URI} !^/?index.php
# Allow access google webmasters file
RewriteCond %{REQUEST_URI} !^/?google.*html
# Allow access to robots.txt
RewriteCond %{REQUEST_URI} !^/?robots.txt
# Allow access to docs
RewriteCond %{REQUEST_URI} !^/?docs
RewriteRule ^/?([^/]+)(/([^/]+))?(/(.*))?$ /index.php?controller=$1&method=$3¶ms=$5 [QSA,L]