-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
27 lines (23 loc) · 874 Bytes
/
.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
# ----------------------------------------------------------------------
# Security Handle
# ----------------------------------------------------------------------
# prevent all accesed start with dot(.) to accesed by external
<Files "^.+">
order allow,deny
deny from all
</Files>
# set default 403 forbidden into Current url
# best for seo features
ErrorDocument 403 /
# ----------------------------------------------------------------------
# Main Web Route
# ----------------------------------------------------------------------
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
# use main.php as indexing
RewriteRule ^(.*)$ main.php [QSA,L]
# handle index.html & main.php to solved as main.php
RewriteRule ^(index\.s?html?|main\.php)?$ main.php [QSA,L]
</IfModule>