Skip to content

Instantly share code, notes, and snippets.

@validkeys
Created September 16, 2013 12:41
Show Gist options
  • Select an option

  • Save validkeys/6580200 to your computer and use it in GitHub Desktop.

Select an option

Save validkeys/6580200 to your computer and use it in GitHub Desktop.
htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
RewriteRule .* - [env=HTTP_KUSH_KEY:%{HTTP:X-KUSH-KEY},last]
</IfModule>
<IfModule mod_headers.c>
SetEnvIf Origin "http(s)?://(www\.)?(localhost:8888|localhost:9000|kyle.local:8888|kyle.local:9000|kyleair.local:9000|src.cdn.kushapp.com.s3.amazonaws.com)$" AccessControlAllowOrigin=$0$1
Header add Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS"
Header add Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, X-Kush-Key"
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment