WordPress htaccess
WordPress uses .htaccess file for SEO friendly URL when using Apache or LiteSpeed webserver.
If WordPress is installed on the root of your website, use following .htaccess file
1 2 3 4 5 6 7 8 9 10 11 |
# 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 |
For WordPress installed on subfolder, use
1 2 3 4 5 6 7 8 9 |
<IfModule mod_rewrite.c> RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase /FOLDER/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /FOLDER/index.php [L] </IfModule> |