-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.htaccess
40 lines (33 loc) · 1.17 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
# ----------------------------------------------------------------
# CONF - htaccess (Apache)
# ---------------------------------------------------------------
# [DEV] Options For Development
Options Indexes FollowSymLinks Multiviews
# ----------------------------------------------------------------
# SECURITY ENGAGEMENT
# ----------------------------------------------------------------
# prevent all accesed start with
# dot(.) to accesed by external
# -------------------------------
<Files "^.+">
Deny From All
</Files>
# set default 403 forbidden into
# Current url - best experience
# Routes
# -------------------------------
ErrorDocument 403 /
# ----------------------------------------------------------------
# ROUTES HANDLER
# ----------------------------------------------------------------
# Handle Index With <main.php>
# -------------------------------
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
# use main.php as indexing
RewriteRule ^(.*)$ index.php [QSA,L]
# handle index.html & main.php to solved as main.php
RewriteRule ^(index\.s?html)?$ index.php [QSA,L]
</IfModule>