htaccess Snippets

2 posts

Ultimate htaccess Redirects List

A list of useful htaccess redirects that you can easily implement on your site. Redirect removed pages Redirect deleted pages back to your site’s home page, or anywhere you want. RedirectMatch 301 /page1/?$ http://mydomain.com/ RedirectMatch 301 /page2/?$ http://mydomain.com/ If all pages share a common pattern, we can rewrite this in […]

Exclude Certain Folders from htaccess Rewrite Rules

If you have an application or CMS running, you might have┬áSEO url’s enabled through .htaccess rewrites. Now installing a second application in a subfolder on the same domain can cause 404 errors. This is because all subfolders follow the rules specified in the root htaccess file. To prevent the errors, […]