-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.htaccess
33 lines (29 loc) · 1.53 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
# ----------------------------------------------------------------------
# | Set options for Apache |
# ----------------------------------------------------------------------
Options +FollowSymlinks -MultiViews -Indexes
# ----------------------------------------------------------------------
# | Rewrite rules for api.phpmyfaq.de |
# ----------------------------------------------------------------------
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Handle preflight OPTIONS requests
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^ - [R=204,L]
# Existing rewrite rules
RewriteRule ^versions$ /version.php [L]
RewriteRule ^version/stable$ /version.php?branch=stable [L]
RewriteRule ^version/development$ /version.php?branch=development [L]
RewriteRule ^version/nightly$ /version.php?branch=nightly [L]
RewriteRule ^verify/(.+)$ /verify.php?version=$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>