View Full Version : Can I 301 Redirect An Entire Subdirectory To Root?
excaliburwebdesigners
Nov 1st 2007, 11:57 am
I have ecommerce store located in subdirectory of my main domain, there is nothing on the main domain so i want to move my entire subdomain up to the sites root.
The are several hundred pages in the store that will be moved up, is the an easy .htaccess mod to do this to tell search engines where the pages have all moved to, as a lot of inner pages have PR.
I dont want my SERPS to be affected so a SEO friendly solution is required.
Thanks in advance.
Colbyt
Nov 1st 2007, 12:05 pm
Any time you make changes there is temporary hit.
What you want to do may be possible.
I would suggest just making a nice intro page on the root with a link to the store and leaving it as it is. Then if you want to promote the main domain you can.
excaliburwebdesigners
Nov 1st 2007, 12:17 pm
Any time you make changes there is temporary hit.
What you want to do may be possible.
I would suggest just making a nice intro page on the root with a link to the store and leaving it as it is. Then if you want to promote the main domain you can.
thats kind of what i am doing currently, but the store index page in the subdirectory was duplicated to the domains index, so there are kind of 2 homepages both the same and was worried about a duplicate content penalty.
Im getting 15K UV P/M so dont really want to do anything to disrupt that.
Colbyt
Nov 1st 2007, 12:21 pm
I don't think I would duplicate the page even though the dupe content penalty is very over-stated.
I would try for some eye candy on the intro page.
PM me the url if you like and I will look later. Keep in mind I am not a guru of any sort.
excaliburwebdesigners
Nov 1st 2007, 12:50 pm
I found this bit of code on another forum
RewriteEngine On
RewriteBase /
RewriteRule ^art/(.*)$ /$1 [R=301,NC,L]
it works a treat, i had to correct a lot of other code in my .htaccess file as well but it all seems to be working :)
The store was running at http://www.mazoo.co.uk/art/index.php
now it redirects to the homepage
http://www.mazoo.co.uk/index.php
so where the store was creating product urls like
http://www.mazoo.co.uk/art/cool-waters-modern-abstract-painting-canvas-p-475.html
the mod will cut the subdirectory part of the url and 301 redirect to
http://www.mazoo.co.uk/cool-waters-modern-abstract-painting-canvas-p-475.html
I just have to remember to update some pages where i have specified some images to load from the old subdirectory and most importantly update my google sitemap.
excaliburwebdesigners
Nov 1st 2007, 12:59 pm
" I don't think I would duplicate the page even though the dupe content penalty is very over-stated. "
I would normally agree, however i have been steady link building and my site dropped from PR3 to PR2 and all my inner pages went from PR2 to PR1 and that was the only explanation i could come up with.
Kuldeep1952
Nov 3rd 2007, 12:20 am
A small word of advice. Donot redirect to /index.php.
Just redirect to your domain name without the index.php.
index.php is implicit. Otherwise with and without index.php
creates a duplicate url problem.
krt
Nov 3rd 2007, 12:37 am
Second that, in fact, I just send 301 redirects from any index.* to the directory root, domain.com/
excaliburwebdesigners
Nov 3rd 2007, 5:06 am
How would i do that?
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.