-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.htaccess
40 lines (30 loc) · 1.38 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
AddDefaultCharset utf-8
ErrorDocument 403 /errordocument/
ErrorDocument 404 /errordocument/
<Files *.php>
Order Deny,Allow
Deny from all
# Allow from 127.0.0.1
</Files>
<FilesMatch "(?i)((\.tpl|\.html|\.ini|\.log|(?<!robots)\.txt))">
Order Deny,Allow
Deny from all
</FilesMatch>
<Files ~ "(index|r)\.(ph?p)$">
Order Allow,Deny
Allow from all
</Files>
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} (?i:midp|samsung|iphone|android)
RewriteRule ^(/)?$ http://m.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTP_USER_AGENT} (?i:midp|samsung|nokia|j2me|avant|docomo|novarra|palmos|palmsource|opwv|chtml|pda|mmp|blackberry|mib|symbian|wireless|nokia|hand|mobi|phone|cdm|upb|audio|SIE|SEC|samsung|HTC|mot-|mitsu|sagem|sony|alcatel|lg|eric|vx|NEC|philips|mmm|xx|panasonic|sharp|wap|sch|rover|pocket|benq|java|pt|pg|vox|amoi|bird|compal|kg|voda|sany|kdd|dbt|sendo|sgh|gradi|jb|dddi|moto|iphone|android)
RewriteRule ^(/)?$ http://m.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
#RewriteCond %{HTTPS} off
#RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#RewriteCond %{HTTP_HOST} !^www\. [NC]
#RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^get/(.*)$ r.php?r=$1 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(?!.*mypanel|public)([^/\.]+)\/(.*)$ index.php?p=$1&augmentation=$2 [L,QSA]
RewriteRule ^(app_config\.ini) - [F,L,NC]