itsmeDrew/missionquest/master/public/.htaccess
<ifModule mod_rewrite.c>
RewriteEngine On
# Force www (http://stackoverflow.com/a/4958847/772859)
# RewriteCond %{HTTP_HOST} !^localhost$
# RewriteCond %{HTTP_HOST} !^www. [NC]
# RewriteCond %{HTTPS}s ^on(s)|
# RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# allow social media crawlers to work by redirecting them to a server-rendered static version on the page
#RewriteCond %{HTTP_USER_AGENT} (facebookexternalhit/[0-9]|Twitterbot|Pinterest|Google.*snippet|Googlebot|redditbot|bingbot)
#RewriteRule blog/(d*)/.*$ http://www.example.com/static-page.php?id=$1 [P]
# Required to allow direct-linking of pages so they can be processed by Angular
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !/api/*
RewriteCond %{REQUEST_URI} !index
RewriteRule (.*) index.html [L]
# with AJAX withCredentials=false (cookies NOT sent)
Header always set Access-Control-Allow-Origin “*”
Header always set Access-Control-Allow-Origin "*.missionquestadv.com"
Header always set Access-Control-Allow-Methods "POST, GET, PUT, OPTIONS, PATCH, DELETE"
Header always set Access-Control-Allow-Headers "X-Accept-Charset,X-Accept,Content-Type"
Header always set Access-Control-Expose-Headers "X-WP-TotalPages, X-WP-Total"
RewriteEngine On
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $1 [R=200,L,E=HTTP_ORIGIN:%{HTTP:ORIGIN}]]
# with AJAX withCredentials=true (cookies sent, SSL allowed...)
SetEnvIfNoCase ORIGIN (.*) ORIGIN=$1
Header always set Access-Control-Allow-Methods "POST, GET, PUT, OPTIONS, PATCH, DELETE"
Header always set Access-Control-Allow-Origin "%{ORIGIN}e"
Header always set Access-Control-Allow-Credentials "true"
Header always set Access-Control-Allow-Headers "X-Accept-Charset,X-Accept,Content-Type"
Header always set Access-Control-Expose-Headers "X-WP-TotalPages, X-WP-Total"
RewriteEngine On
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $1 [R=200,L,E=HTTP_ORIGIN:%{HTTP:ORIGIN}]
</ifModule>
On Github License
Files