Only Use One .htaccess file for mod_rewrites

Expert SEO Dave Naylor shares a useful tip related to .htaccess files – he calls it a bad decision to have .htaccess files in different directories on your web server:

Example:

  • Say I have my site, path-wise located at /
  • My site also has a shop, located at /shop/

The problem is that your /shop/.htaccess not only overrides /.htaccess for all the /shop/.* URLs, but it actually *disables* all the rewrites for /.htaccess.

This is a problem if for example you one day decide to do any mass site-wide redirects, such as domain or protocol canonicalisation. Cleaning up those old URLs can be a problem too.

Dave Naylor a UK SEO

[tags]seo[/tags]

Find this article at: http://www.labnol.org/internet/favorites/only-use-one-htaccess-file-for-mod_rewrites/342/

Tags: , Internet, Tumblelog



Google Custom Search