Skip to content

Commit ae96ba4

Browse files
committed
Changed apache htaccess file to use mod_rewrite instead of mod_authz because it is compatible with apache 2.2 and 2.4 and is less complex.
1 parent b17bbf2 commit ae96ba4

File tree

2 files changed

+8
-32
lines changed

2 files changed

+8
-32
lines changed

.htaccess

+3-32
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,3 @@
1-
# Apache 2.2
2-
<IfModule !mod_authz_core.c>
3-
Deny from all
4-
</IfModule>
5-
6-
# Apache 2.4
7-
<IfModule mod_authz_core.c>
8-
Require all denied
9-
</IfModule>
10-
ErrorDocument 403 "403 Access Restricted. <a href='installer.php'>Go to installer</a>"
11-
<FilesMatch "\.(png|jpg|gif|GIF|PNG|JPG|jpeg|JPEG|ICO|js|css|html|xml|htm)$">
12-
# Apache 2.2
13-
<IfModule !mod_authz_core.c>
14-
Allow from all
15-
</IfModule>
16-
17-
# Apache 2.4
18-
<IfModule mod_authz_core.c>
19-
Require all granted
20-
</IfModule>
21-
</FilesMatch>
22-
<FilesMatch "(installer\.php|index\.php|install_form.js.php)$">
23-
# Apache 2.2
24-
<IfModule !mod_authz_core.c>
25-
Allow from all
26-
</IfModule>
27-
28-
# Apache 2.4
29-
<IfModule mod_authz_core.c>
30-
Require all granted
31-
</IfModule>
32-
</FilesMatch>
1+
RewriteEngine On
2+
RewriteRule (installer\.php|index\.php|install_form.js.php)$ - [L]
3+
RewriteRule !.+\.(png|jpg|gif|GIF|PNG|JPG|jpeg|JPEG|ICO|js|css|html|xml|htm)$ 403.html [L]

403.html

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<!doctype html>
2+
<html>
3+
<head>Access Restricted</head>
4+
<body>403 Access Restricted. <a href='installer.php'>Go to installer</a></body>
5+
</html>

0 commit comments

Comments
 (0)