Created
September 7, 2022 20:54
-
-
Save ruman/ebf40f5c1574224c5679a89784689fba to your computer and use it in GitHub Desktop.
Basic .htaccess file for Wordpress
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 WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] | |
RewriteBase / | |
RewriteRule "^(.*/)?\.git/" - [F,L] | |
RedirectMatch 404 /\.git | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
<Files xmlrpc.php> | |
order deny,allow | |
deny from all | |
</Files> | |
</IfModule> | |
# END WordPress |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment