-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
37 lines (30 loc) · 1.44 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
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# !! CAUTION: !!
# !! Making any changes to this file can break your web app. !!
# ¡¡ Please proceed only if you are familiar with the .htaccess file. ¡¡
# ¡¡ Some options are commented by default, if you need it, just ¡¡
# ¡¡ uncomment the line. ¡¡
# ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
# -- Access control --
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Methods "DELETE, POST, GET, PUT, OPTIONS"
# Header set Access-Control-Allow-Headers "Origin, Content-Type"
# Header set Access-Control-Request-Headers "Origin, Content-Type"
# Header set Access-Control-Allow-Credentials false
Header add X-Frame-Options "SAMEORIGIN"
# -- Index all directories --
Options All -Indexes
# -- Allow rewrite permissions for custom directories --
RewriteEngine On
# -- Block access to non .php files --
<FilesMatch "\.(?!(php)$)[^\.]+$">
Order Allow,Deny
Deny from all
</FilesMatch>
# -- Restrict Access to .php Files in the Web App --
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule \.php$ - [F,L]
# -- Redirect All Requests to index.php --
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php