-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
38 lines (30 loc) · 1.32 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
ErrorDocument 404 /errdoc.php
<ifmodule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access plus 6 months"
ExpiresByType image/jpeg "access plus 6 months"
ExpiresByType image/png "access plus 6 months"
</IfModule>
# xss
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]
# xss
#RewriteRule ^rss/$ rss\.php [L,QSA]
RewriteRule ^getimg/([0-9]+)/([0-9]+)/(?:(1)\/)?([A-z]+)/(.*)$ getimg\.php?w=$1&h=$2&mirror=$3&m=$4&path=$5 [L,QSA]
RewriteRule ^cacheimg/([0-9]+)/([0-9]+)/([A-z]+)/(.*)$ kernel/cache/images/image__upload_images_$4_$3_$1x$2_FFFFFF_100_0\.jpg [L,QSA]
RewriteRule ^cacheimg/([0-9]+)/([0-9]+)/1/([A-z]+)/(.*)$ kernel/cache/images/image__upload_images_$5_$4_$1x$2_FFFFFF_100_1\.jpg [L,QSA]
#RewriteCond %{QUERY_STRING} !vardump
#RewriteRule (.*) %{REQUEST_URI}?vardump=1&r=%{REQUEST_URI} [R=302,L,QSA]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ /index.php?%{QUERY_STRING} [L]
</IfModule>
php_flag register_globals off
php_flag magic_quotes_gpc off