HTML and CSS Reference
If you have existing rewrite rules, perform the following steps to make sure you set
up your rewrite rules correctly. Not doing so can cause incorrect redirects and 404
• Keep a backup: Back up the .htaccess file you are going to add redir-
ects to, before you start adding them. This way you can quickly go back
to the backup file if you are unable to access your site because of an er-
ror in the . htaccess file.
• Do not append or replace existing rewrite rules: Instead of appending or
replacing existing rules from CMSes you are using, merge them within.
• Watch the order of rewrite rules: Make sure you add the slash first and
then your existing rules, which might rewrite the end paths.
• Confirm the RewriteBase path: If your website is in a subfolder, ensure
you have set the right RewriteBase path for your rewrite rules. If you
have a working RewriteBase path, do not remove it.
Finally, consider implementing guidelines from Google's SEO Starter