-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
executable file
·107 lines (95 loc) · 4.36 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
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
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
php_flag log_errors on
php_flag ignore_repeated_errors off
php_flag ignore_repeated_source off
php_flag report_memleaks on
php_flag track_errors on
php_value docref_root 0
php_value docref_ext 0
php_value error_log /home/v/vtolst/vesprom.rf/public_html/PHP_errors.log
php_value error_reporting 2047
php_value log_errors_max_len 0
<Files PHP_errors.log>
Order allow,deny
Deny from all
Satisfy All
</Files>
#####################################
# ShopCMS: Ñêðèïò èíòåðíåò-ìàãàçèíà
# Copyright (c) by ADGroup
# http://shopcms.ru
#####################################
Options +FollowSymlinks -Indexes -MultiViews
DirectoryIndex index.php
ErrorDocument 404 /404.html
php_value session.use_trans_sid 0
php_value session.use_cookies 1
php_value session.use_only_cookies 1
php_value session.auto_start 0
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value display_errors 0
php_value magic_quotes_runtime 0
php_value allow_url_fopen 1
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{REQUEST_URI} ^/forward$
RewriteCond %{QUERY_STRING} ^url=(.*)$
RewriteRule ^(.*)$ %1? [R=302,L]
# RewriteCond %{HTTP_HOST} !^www\.xn--b1agvhegf\.xn--p1ai$ [NC]
# RewriteRule ^(.*)$ http://www.xn--b1agvhegf.xn--p1ai/$1 [R=301,L]
RewriteBase /
RewriteCond %{THE_REQUEST} /(\.+) [OR]
RewriteCond %{THE_REQUEST} /(\?+) [OR]
RewriteCond %{THE_REQUEST} /(/+)
RewriteRule ^(.*)$ 404.html [L]
RewriteRule ^core/(install|temp|smarty|modules|languages|includes|functions|fonts|files|config|classes|cache|backup)/(.*) - [F]
RewriteRule ^data/(.+)\.(tpl\.html|php|php3|php4|php5|phtml|pl|cgi) - [F]
RewriteRule ^install_check\.html$ install.php?check=yes [L]
RewriteRule ^index\.html$ index.php [L]
RewriteRule ^news\.html$ index.php?news=yes [L]
RewriteRule ^price\.html$ index.php?show_price=yes [L]
RewriteRule ^cart\.html$ index.php?shopping_cart=yes [L]
RewriteRule ^wide_search\.html$ index.php?search_with_change_category_ability=yes [L]
RewriteRule ^feedback\.html$ index.php?feedback=yes [L]
RewriteRule ^compare\.html$ index.php?comparison_products=yes [L]
RewriteRule ^page_([0-9]+)\.html$ index.php?show_aux_page=$1 [L]
RewriteRule ^product_([0-9]+)\.html$ index.php?productID=$1 [L]
RewriteRule ^category_([0-9]+)\.html$ index.php?categoryID=$1 [L]
RewriteRule ^category_([0-9]+)_offset_([0-9]+)\.html$ index.php?categoryID=$1&offset=$2 [L]
RewriteRule ^category_([0-9]+)_show_all\.html$ index.php?categoryID=$1&show_all=yes [L]
RewriteRule ^show_news_([0-9]+)\.html$ index.php?fullnews=$1 [L]
<IfModule mod_nginx.c>
# Áëîê ïðàâèë äëÿ ñåðâåðà Nginx.
#  ñëó÷àå åãî èñïîëüçîâàíèÿ íåîáõîäèìî âñòàâèòü íèæåóêàçàííûå ïðàâèëà â ôàéë nginx.conf â ñåêöèþ location/ äëÿ âàøåãî ñàéòà.
location ~* /core/(install|temp|smarty|modules|languages|includes|functions|fonts|files|config|classes|cache|backup)/(.*) {
return 403;
}
location ~* /data/(.+)\.(tpl\.html|php|php3|php4|php5|phtml|pl|cgi) {
return 403;
}
rewrite ^/install_check\.html$ /install.php?check=yes last;
rewrite ^/index\.html$ /index.php last;
rewrite ^/news\.html$ /index.php?news=yes last;
rewrite ^/price\.html$ /index.php?show_price=yes last;
rewrite ^/cart\.html$ /index.php?shopping_cart=yes last;
rewrite ^/wide_search\.html$ /index.php?search_with_change_category_ability=yes last;
rewrite ^/feedback\.html$ /index.php?feedback=yes last;
rewrite ^/compare\.html$ /index.php?comparison_products=yes last;
rewrite ^/page_([0-9]+)\.html$ /index.php?show_aux_page=$1 last;
rewrite ^/product_([0-9]+)\.html$ /index.php?productID=$1 last;
rewrite ^/category_([0-9]+)\.html$ /index.php?categoryID=$1 last;
rewrite ^/category_([0-9]+)_offset_([0-9]+)\.html$ /index.php?categoryID=$1&offset=$2 last;
rewrite ^/category_([0-9]+)_show_all\.html$ /index.php?categoryID=$1&show_all=yes last;
rewrite ^/show_news_([0-9]+)\.html$ /index.php?fullnews=$1 last;
</IfModule>
# BEGIN Human friendly URL's
RewriteRule ^catalog/([^/]*)$ index.php?uri=$1&uriFor=category [L]
RewriteRule ^catalog/([^/]*)/([^/]*)/([^/]*)$ index.php?uri=$3&uriFor=product [L]
RewriteRule ^catalog/([^/]*)/([^/]*)$ index.php?uri=$2&uriFor=product [L]
RewriteRule ^news/([^/]*)$ index.php?uri=$1&uriFor=news [L]
RewriteRule ^pages/([^/]*)$ index.php?uri=$1&uriFor=pages [L]
# END Human friendly URL's