-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.htaccess
More file actions
28 lines (20 loc) · 924 Bytes
/
Copy path.htaccess
File metadata and controls
28 lines (20 loc) · 924 Bytes
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
DirectoryIndex index.php
RewriteEngine On
RewriteBase /
# Force HTTPS
#RewriteCond %{HTTPS} !=on
#RewriteRule ^/?(.*)$ https://%{HTTP_HOST}/$1 [R,L]
# Prevent direct access to anything in the includes folder (code, configs, modules, data, etc)
RewriteRule ^includes/(.*)$ error/404 [R=301,L,NC]
# Prevent Infinite Loop
RewriteRule ^includes/library/base.php$ - [L,NC]
# Rewrite appropriate URLs to our engine
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /includes/library/base.php [L]
RewriteRule ^$ includes/library/base.php [L,NC,QSA]
RewriteRule ^(.*)/$ includes/library/base.php [L,NC,QSA]
RewriteRule ^((.*/)*([^/\.]+))$ includes/library/base.php [L,NC,QSA]
RewriteRule ^(.*)\.(php|phtml|html|json)$ includes/library/base.php [L,NC,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)\.(html|js|css)$ includes/library/base.php [L,NC,QSA]