Last active
April 30, 2019 20:24
-
-
Save aramboyajyan/b2872be03b3c48a35081 to your computer and use it in GitHub Desktop.
.htaccess block wordpress directories (for use in Drupal websites)
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
# Non-existing URLs that are usually visited by bots. We will issue a server | |
# redirect to 404.html to avoid any overhead caused by bots trying to break into | |
# the site. | |
# | |
# WordPress folders. | |
RedirectMatch 301 /wp-admin /404.html | |
RedirectMatch 301 /wp-content /404.html | |
RedirectMatch 301 /wp-includes /404.html | |
# WordPress files. | |
RedirectMatch 301 /wp-cron.php /404.html | |
RedirectMatch 301 /wp-config.php /404.html | |
RedirectMatch 301 /wp-login.php /404.html | |
RedirectMatch 301 /wp-signup.php /404.html | |
# Random other URLs. | |
RedirectMatch 301 /admin.php /404.html | |
RedirectMatch 301 /administrator /404.html | |
RedirectMatch 301 /admin/fckeditor /404.html |
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
This page does not exist. <a href="./">Click here</a> to go back to the home page. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment