Created
October 13, 2016 05:59
-
-
Save matthewpizza/89c282358f5ca479d2d9ee0a4f34810a to your computer and use it in GitHub Desktop.
nginx snippet to rewrite WordPress to a subdirectory install (in this case the wp dir)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!-e $request_filename) { | |
rewrite /wp-admin$ $scheme://$host$uri/ permanent; | |
rewrite ^(/[^/]+)?(/wp-.*) /wp$2 last; | |
rewrite ^(/[^/]+)?(/.*\.php)$ /wp$2 last; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment