-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdomain.tld.conf
113 lines (102 loc) · 4.73 KB
/
domain.tld.conf
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#Specify a charset
charset utf-8;
location / {
index index.php;
rewrite ^/api/?(.*)$ /webservice/dispatcher.php?url=$1 last;
rewrite ^/([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1-$2$3.jpg last;
rewrite ^/([0-9]+)\-([0-9]+)/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1-$2.jpg last;
rewrite ^/([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$1$2.jpg last;
rewrite ^/([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$1$2$3.jpg last;
rewrite ^/([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$1$2$3$4.jpg last;
rewrite ^/([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5.jpg last;
rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6.jpg last;
rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7.jpg last;
rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8.jpg last;
rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9.jpg last;
rewrite ^/c/([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ /img/c/$1$2.jpg last;
rewrite ^/c/([a-zA-Z-]+)/[a-zA-Z0-9-]+\.jpg$ /img/c/$1.jpg last;
### qsa
rewrite ^/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$1$3 last;
rewrite ^/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /category.php?id_category=$1$3 last;
rewrite ^/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2$4 last;
rewrite ^/([0-9]+)__([a-zA-Z0-9-]*)(.*)$ /supplier.php?id_supplier=$1$3 last;
rewrite ^/([0-9]+)_([a-zA-Z0-9-]*)(.*)$ /manufacturer.php?id_manufacturer=$1$3 last;
rewrite ^/content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /cms.php?id_cms=$1$3 last;
rewrite ^/content/category/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /cms.php?id_cms_category=$1$3 last;
### //qsa
rewrite ^/([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ /img/c/$1$2.jpg last;
### qsa
rewrite ^/page-not-found(.*)$ /404.php$1 last;
rewrite ^/address(.*)$ /address.php$1 last;
rewrite ^/addresses(.*)$ /addresses.php$1 last;
rewrite ^/authentication(.*)$ /authentication.php$1 last;
rewrite ^/best-sales(.*)$ /best-sales.php$1 last;
rewrite ^/cart(.*)$ /cart.php$1 last;
rewrite ^/contact-form(.*)$ /contact-form.php$1 last;
rewrite ^/discount(.*)$ /discount.php$1 last;
rewrite ^/guest-order-tracking(.*)$ /guest-tracking.php$1 last;
rewrite ^/order-history(.*)$ /history.php$1 last;
rewrite ^/identity(.*)$ /identity.php$1 last;
rewrite ^/manufacturer(.*)$ /manufacturer.php$1 last;
rewrite ^/my-account(.*)$ /my-account.php$1 last;
rewrite ^/new-products(.*)$ /new-products.php$1 last;
rewrite ^/order(.*)$ /order.php$1 last;
rewrite ^/order-details(.*)$ /order-follow.php$1 last;
rewrite ^/order-opc(.*)$ /order-opc.php$1 last;
rewrite ^/order-slip(.*)$ /order-slip.php$1 last;
rewrite ^/password(.*)$ /password.php$1 last;
rewrite ^/prices-drop(.*)$ /prices-drop.php$1 last;
rewrite ^/search(.*)$ /search.php$1 last;
rewrite ^/sitemap(.*)$ /sitemap.php$1 last;
rewrite ^/stores(.*)$ /stores.php$1 last;
rewrite ^/supplier(.*)$ /supplier.php$1 last;
### // qsa
# this serves static files that exist without running other rewrite tests
if (-f $request_filename) {
expires 30d;
break;
}
# Rewrite rules
if (!-e $request_filename) {
rewrite ^(.+)$ /index.php?q=$1 last;
}
}
# Directories explicitly allowed in directories blocked below
location ~ ^/(.*)/docs/csv_import/ {
allow all;
}
# Block everything else in these directories
location ~ ^/(.*)/img/cms/ {
deny all;
}
# Allow access to the ACME Challenge for Let's Encrypt
location ~ /\.well-known\/acme-challenge {
allow all;
}
# Block all files with these extensions
location ~ \.(md|tpl)$ {
deny all;
}
# Deny all attempts to access hidden files
# such as .htaccess, .htpasswd, .DS_Store (Mac).
location ~ /\.ht {
deny all;
}
# 1 week expiry on CSS and JavaScript
location ~ \.(css|js)$ {
expires 1w;
add_header Cache-Control public;
allow all;
}
# Robots & favicon
location = /robots.txt { access_log off; log_not_found off; }
location = /favicon.ico { access_log off; log_not_found off; }
location ~* ^.+\.(jpg|jpeg|gif|css|png|js|xml)$ {
expires 30d;
access_log off;
#set $memcached_key $uri;
#memcached_pass 127.0.0.1:11211;
}
location /admin650/ {
try_files $uri $uri/ /adminxxxx/index.php$args;
}