Create a default WordPress .htaccess File

In this article, You should learn how to recreate a default WordPress .htaccess file. You just need to create a file named .htaccess under the root folder of your site and paste the following code to it.

# BEGIN WordPress
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

You may also visit the WordPress site reference here & also check the .htaccess file tips & tricks.

Leave a Reply