Skip to content

Instantly share code, notes, and snippets.

@dlgg
Forked from samrocketman/httpd.conf
Created March 25, 2014 02:20
Show Gist options
  • Save dlgg/9754136 to your computer and use it in GitHub Desktop.
Save dlgg/9754136 to your computer and use it in GitHub Desktop.
#http://httpd.apache.org/docs/2.2/rewrite/intro.html#rewritecond
#http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritecond
#http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriterule
#Use NOT logic. If cookie doesn't exist then redirect. Otherwise, default behavior.
RewriteCond %{HTTP_COOKIE} !request_method
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^/$ /public/ [NE,R,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment