Skip to content

Commit 3bc9333

Browse files
committed
Fixed Admin subfolders access
1 parent 9c003c3 commit 3bc9333

10 files changed

Lines changed: 48 additions & 11 deletions

File tree

admin/.htaccess

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
AddDefaultCharset UTF-8
22
DirectoryIndex index.php
33

4+
Options -Indexes
5+
46
<Files .htaccess>
57
order allow,deny
68
deny from all
@@ -18,6 +20,6 @@ RewriteCond %{REQUEST_FILENAME} !-d
1820
RewriteCond $1 !^(index\.php)
1921
RewriteRule ^(.*)$ index.php/$1 [L]
2022

21-
ErrorDocument 401 /admin/admin-pages/401.html
22-
ErrorDocument 404 /admin/admin-pages/404.html
23-
ErrorDocument 403 /admin/admin-pages/404.html
23+
ErrorDocument 401 /admin/401.html
24+
ErrorDocument 403 /admin/403.html
25+
ErrorDocument 404 /admin/404.html
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<h3 class="panel-title">401 Not Authorized</h3>
2828
</div>
2929
<div class="panel-body">
30-
<div style="text-align:center"><a href="/admin/" target="_parent">Go Login</a></div>
30+
<div style="text-align:center"><a href="/admin" target="_parent">Go Login</a></div>
3131
</div>
3232
</div>
3333
</div>

admin/403.html

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
7+
<meta name="description" content="">
8+
<meta name="author" content="">
9+
<title>autoCMS</title>
10+
<!-- Bootstrap Core CSS -->
11+
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet" type="text/css">
12+
<link href="/admin/css/autocms.css" rel="stylesheet">
13+
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
14+
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
15+
<!--[if lt IE 9]>
16+
<script src="//oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
17+
<script src="//oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
18+
<![endif]-->
19+
</head>
20+
<body>
21+
<div class="container">
22+
<div class="row">
23+
<div class="col-md-4 col-md-offset-4">
24+
<div class="login-panel panel panel-default">
25+
<div class="panel-heading">
26+
<h3 class="panel-title">403 Forbidden</h3>
27+
</div>
28+
<div class="panel-body">
29+
<div style="text-align:center"><a href="/admin" target="_parent">Go Home</a></div>
30+
</div>
31+
</div>
32+
</div>
33+
</div>
34+
</div>
35+
<!-- jQuery -->
36+
<script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
37+
<!-- Bootstrap Core JavaScript -->
38+
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
39+
</body>
40+
</html>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<h3 class="panel-title">404 Not Found</h3>
2727
</div>
2828
<div class="panel-body">
29-
<div style="text-align:center"><a href="/admin/" target="_parent">Go Home</a></div>
29+
<div style="text-align:center"><a href="/admin" target="_parent">Go Home</a></div>
3030
</div>
3131
</div>
3232
</div>

admin/css/.htaccess

Lines changed: 0 additions & 1 deletion
This file was deleted.

admin/images/.htaccess

Lines changed: 0 additions & 1 deletion
This file was deleted.

admin/img/.htaccess

Lines changed: 0 additions & 1 deletion
This file was deleted.

admin/js/.htaccess

Lines changed: 0 additions & 1 deletion
This file was deleted.

admin/originals/.htaccess

Lines changed: 0 additions & 1 deletion
This file was deleted.

admin/other/.htaccess

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Options -Indexes
22

33
order allow,deny
4-
deny from all
4+
deny from all

0 commit comments

Comments
 (0)