-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathhtaccess_example.txt
More file actions
74 lines (61 loc) · 2.47 KB
/
htaccess_example.txt
File metadata and controls
74 lines (61 loc) · 2.47 KB
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
# In case you want to add a .htpasswd authentification
# you'll have to add the host of the shop as an allowed entity,
# so that calls from the host skip the authentification
# Example:
# Order Deny,Allow
# Deny from All
# AuthType Basic
# AuthName "Access not allowed"
# AuthUserFile path_to_htpasswd_file/.htpasswd
# Require valid-user
# Allow from localhost
# Satisfy Any
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} config\.inc\.php [NC]
RewriteRule ^config\.inc\.php index\.php [R=301,L]
RewriteCond %{QUERY_STRING} fnc=(getShopVersion|getShopEdition|getRevision) [NC]
RewriteRule ^(.*)$ $1? [R=301,L]
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
RewriteCond %{REQUEST_URI} oxseo\.php$
RewriteCond %{QUERY_STRING} mod_rewrite_module_is=off
RewriteRule oxseo\.php$ oxseo.php?mod_rewrite_module_is=on [L]
# OXID|JSON start
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]
RewriteCond %{REQUEST_URI} .*oxrest.*
RewriteCond %{REQUEST_URI} !oxrest\.php$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* oxrest/oxrest.php [L,QSA]
# OXID|JSON end
RewriteCond %{REQUEST_URI} !(\/admin\/|\/core\/|\/application\/|\/export\/|\/modules\/|\/out\/|\/setup\/|\/tmp\/|\/views\/)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !(\.html|\/|\.jpg|\.css|\.pdf|\.doc|\.gif|\.png|\.js|\.htc|\.svg)$ %{REQUEST_URI}/ [R=301,L]
RewriteCond %{REQUEST_URI} !(\/admin\/|\/core\/|\/application\/|\/export\/|\/modules\/|\/out\/|\/setup\/|\/tmp\/|\/views\/)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (\.html|\/)$ oxseo.php
RewriteCond %{REQUEST_URI} (\/out\/pictures\/generated\/)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (\.jpe?g|\.gif|\.png|\.svg)$ getimg.php
</IfModule>
# disabling log file access from outside
<FilesMatch "(EXCEPTION_LOG\.txt|\.log|\.tpl|pkg\.rev|\.ini|pkg\.info|\.pem)$">
order allow,deny
deny from all
</FilesMatch>
# Prevent .ht* files from being sended to outside requests
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
Options -Indexes
# OXID|JSON start
#DirectoryIndex index.php index.html
DirectoryIndex index.html index.php
# OXID|JSON end