Skip to content

Instantly share code, notes, and snippets.

@tomoconnor
Created May 11, 2011 16:00
Show Gist options
  • Save tomoconnor/966745 to your computer and use it in GitHub Desktop.
Save tomoconnor/966745 to your computer and use it in GitHub Desktop.
Rewrite Rule to disallow non-cookie authed users
RewriteEngine On
RewriteCond %{HTTP_COOKIE} !^PHPSESSID [NC]
RewriteRule .*/? http://example.org/not-authorized [R]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment