McCambletron Posted March 5, 2009 Share Posted March 5, 2009 Hey guys, This isn't specifically an osC question, but I hope someone can help me anyway... I'm trying to redirect all traffic from "http://www.ocdepot.com" or "http://ocdepot.com" TO my store at http://www.ocdepot.com/oscom/ --- but NOT redirect requests for other files and directories on my website. I ONLY want the actual domain name to redirect here. So if I were to try and access ocdepot.com/art/index.htm, I DO NOT want it to redirect to ocdepot.com/oscom/art/index.htm Right now, you can see the problem I'm having by trying to go here: http://www.ocdepot.com/art/CommonLinks/CommonLinks.html There's some kind of loop error when it tries to handle anything besides just the domain name. Options +FollowSymlinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ocdepot\.com [NC] RewriteRule (.*) [url="http://www.ocdepot.com/oscom$1"]http://www.ocdepot.com/oscom$1[/url] [R=301] www.ocdepot.com redirects great... but www.ocdepot.com/art/ causes problems. HELP! Link to comment Share on other sites More sharing options...
mme Posted March 5, 2009 Share Posted March 5, 2009 why not use php ? use a http header change ? Link to comment Share on other sites More sharing options...
McCambletron Posted March 5, 2009 Author Share Posted March 5, 2009 why not use php ? use a http header change ? Search engines aren't too fond of that. Link to comment Share on other sites More sharing options...
McCambletron Posted March 6, 2009 Author Share Posted March 6, 2009 Nobody? Link to comment Share on other sites More sharing options...
morehawes Posted March 8, 2009 Share Posted March 8, 2009 I think the header redirect would not be too much of an issue for just the home page, especially if you do it as a 301. Or how about this?: RewriteCond %{HTTP_HOST} ^(www.)?ocdepot.com$ RewriteRule ^(/)?$ oscom/ [L] Joe. Joe MacMan strikes again! Always backup first before listening to me! Link to comment Share on other sites More sharing options...
McCambletron Posted March 9, 2009 Author Share Posted March 9, 2009 I think the header redirect would not be too much of an issue for just the home page, especially if you do it as a 301. Or how about this?: RewriteCond %{HTTP_HOST} ^(www.)?ocdepot.com$ RewriteRule ^(/)?$ oscom/ [L] Joe. Hey, I actually think that's working! Thanks! If I end up having any trouble with it I'll try a header redirect --I could have sworn I read they weren't good for SEO to your entry page, but I'll give one a shot if I have to. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.