Created
February 10, 2014 12:08
-
-
Save eugenoprea/8914758 to your computer and use it in GitHub Desktop.
This code will redirect all pages to the homepage, while still allowing you to access the admin area.
This file contains 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
# BEGIN redirect to homepage | |
RewriteEngine on | |
RewriteCond %{REQUEST_URI} !^/$ | |
RewriteCond %{REQUEST_URI} !\.(gif|jpe?g|png|css|js|php)$ | |
RewriteCond %{REQUEST_URI} !^/wp-admin [NC] | |
RewriteRule .* / [L,R=301] | |
#END redirect to homepage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment