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/

web: http://www.labnol.org/ email: amit@labnol.org


If you have a question or suggestion that is not related to the above discussion, please post it in this forum. All comments are moderated.

Add a Comment

required, use real name
required, will not be published
optional, your blog address

« Back to main

Google Custom Search