Skip to content

Instantly share code, notes, and snippets.

@ahgood
Created June 19, 2016 05:53
Show Gist options
  • Save ahgood/c944223fb1a99c7831c058cefeb14e28 to your computer and use it in GitHub Desktop.
Save ahgood/c944223fb1a99c7831c058cefeb14e28 to your computer and use it in GitHub Desktop.
A working sample of .htaccess file for JWT workaround, /wp1/ is WordPress root folder.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]
RewriteBase /wp1/
RewriteRule ^index\.php$ - [E=X-HTTP_AUTHORIZATION:%{HTTP:Authorization},QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp1/index.php [E=X-HTTP_AUTHORIZATION:%{HTTP:Authorization},QSA,L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment