-
Notifications
You must be signed in to change notification settings - Fork 1
/
.htaccess
188 lines (173 loc) · 4.54 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /boards/
## there is no reason for there to be anything but post and get
#tank 12/29/2019
RewriteEngine on
RewriteCond %{THE_REQUEST} !^(POST|GET)\ /.*\ HTTP/1\.1$
RewriteRule .* - [F]
#handle hotlinking
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^https://(www\.)autohotkey.com/.*$ [NC]
RewriteRule \.(gif|jpg|jpeg|bmp|zip|rar|mp3|flv|swf|xml|png|css|pdf)$ - [F]
#fraud site
RewriteCond %{HTTP_REFERER} ^https://www\.autohotkey\.fr [NC]
RewriteRule ^(.*)$ https://www.autohotkey.com/boards/viewtopic.php?f=2&t=70926 [R=301,L]
RewriteCond %{HTTP_HOST} !=""
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
#
# Uncomment the statement below if URL rewriting doesn't
# work properly. If you installed phpBB in a subdirectory
# of your site, properly set the argument for the statement.
# e.g.: if your domain is test.com and you installed phpBB
# in http://www.test.com/phpBB/index.php you have to set
# the statement RewriteBase /phpBB/
#
#RewriteBase /
#
# Uncomment the statement below if you want to make use of
# HTTP authentication and it does not already work.
# This could be required if you are for example using PHP via Apache CGI.
#
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
# The following 3 lines will rewrite URLs passed through the front controller
# to not require app.php in the actual URL. In other words, a controller is
# by default accessed at /app.php/my/controller, but can also be accessed at
# /my/controller
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ app.php [QSA,L]
#
# If symbolic links are not already being followed,
# uncomment the line below.
# http://anothersysadmin.wordpress.com/2008/06/10/mod_rewrite-forbidden-403-with-apache-228/
#
#Options +FollowSymLinks
</IfModule>
# With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from
# module mod_authz_host to a new module called mod_access_compat (which may be
# disabled) and a new "Require" syntax has been introduced to mod_authz_host.
# We could just conditionally provide both versions, but unfortunately Apache
# does not explicitly tell us its version if the module mod_version is not
# available. In this case, we check for the availability of module
# mod_authz_core (which should be on 2.4 or higher only) as a best guess.
<IfModule mod_version.c>
<IfVersion < 2.4>
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
<Files "common.php">
Order Allow,Deny
Deny from All
</Files>
</IfVersion>
<IfVersion >= 2.4>
<Files "*.php">
Require all denied
</Files>
<Files "*.php*">
Require all denied
</Files>
<Files "index.php">
Require all granted
</Files>
<Files "download.php">
Require all granted
</Files>
<Files "ucp.php">
Require all granted
</Files>
<Files "cron.php">
Require all granted
</Files>
<Files "faq.php">
Require all granted
</Files>
<Files "feed.php">
Require all granted
</Files>
<Files "mcp.php">
Require all granted
</Files>
<Files "posting.php">
Require all granted
</Files>
<Files "viewtopic.php">
Require all granted
</Files>
<Files "viewpost.php">
Require all granted
</Files>
<Files "viewforum.php">
Require all granted
</Files>
<Files "viewonline.php">
Require all granted
</Files>
<Files "memberlist.php">
Require all granted
</Files>
<Files "file.php">
Require all granted
</Files>
<Files "report.php">
Require all granted
</Files>
<Files "search.php">
Require all granted
</Files>
<Files "data_global.php">
Require all granted
</Files>
<Files "search.php">
Require all granted
</Files>
<Files "*.gif">
Require all granted
</Files>
<Files "*.ico">
Require all granted
</Files>
<Files "*.png">
Require all granted
</Files>
<Files "*.jpg">
Require all granted
</Files>
<Files "*.bmp">
Require all granted
</Files>
<Files "app.php">
Require all granted
</Files>
<Files "access.php">
Require all granted
</Files>
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
<IfModule !mod_authz_core.c>
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
<Files "common.php">
Order Allow,Deny
Deny from All
</Files>
</IfModule>
<IfModule mod_authz_core.c>
<Files "config.php">
Require all denied
</Files>
<Files "common.php">
Require all denied
</Files>
</IfModule>
</IfModule>