-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.htaccess
More file actions
30 lines (26 loc) · 1.3 KB
/
.htaccess
File metadata and controls
30 lines (26 loc) · 1.3 KB
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
# ----------------------------------------------------------------------
# | Set options for Apache |
# ----------------------------------------------------------------------
Options +FollowSymlinks -MultiViews -Indexes
# ----------------------------------------------------------------------
# | Redirect all requests to public/ (Front Controller) |
# ----------------------------------------------------------------------
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Handle preflight OPTIONS requests early
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^ - [R=204,L]
# Send everything to public/, keep existing paths
RewriteRule ^public/ - [L]
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
# ----------------------------------------------------------------------
# | Cross-origin requests for api.phpmyfaq.de |
# ----------------------------------------------------------------------
<IfModule mod_headers.c>
Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Methods "GET, POST, OPTIONS"
Header always set Access-Control-Allow-Headers "origin, content-type, accept, x-requested-with"
Header always set Access-Control-Max-Age "3600"
</IfModule>