Welcome to WebmasterWorld Guest from

Forum Moderators: goodroi

Message Too Old, No Replies

301 redirect

2:09 am on Nov 16, 2012 (gmt 0)

New User

5+ Year Member

joined:May 16, 2012
posts: 5
votes: 0

Not sure if this is the correct category to post to. If not, let me know which. I just came into a project where my client redesigned her site and also went with a new shopping cart. The old site would redirect from www.myclient.com to www.myclient.com/site. We just migrated to the new shopping cart, but when you Google it - it still has the www.myclient.com/site and when you click it - you get a "this link is broken error". I'm not too technical, so please let me know how I can resolve this. I guess we need www.myclient.com/site to now redirect to www.myclient.com.
3:43 am on Nov 16, 2012 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
votes: 848

I kinda think this thread is about to be bumped over to Apache. Or, oops, to IIS. In fact someone will need to know which it is, or nobody will be able to start on the "how" question.

Meanwhile you will be happy to hear that we like getting everything spelled out clearly in English. But you will have to be a little bit technical. At least technical enough to look into your physical site (by FTP or similar) and see what's there.

If you've changed any part of your software, they have probably given you a new htaccess to go with it. Or, ahem, IIS equivalent.
5:58 am on Nov 16, 2012 (gmt 0)


WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
votes: 236

welcome to WebmasterWorld, ultrafade!

when you request http://www.example.com/site what status code are you getting?
i assume it's a 404 with the "this link is broken error".
you should be responding with a 301 status code and this HTTP Response header:

Location: http://www.example.com/

as lucy24 mentioned, how you do that depends on your configuration.
11:02 am on Dec 17, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
votes: 0

Canonical tags can't help here as the request doesn't result in a page of content being returned.

You'll need to set up redirects from the old to the new URLs. If it is a "simple" change in the URL, such as adding, removing or changing a folder name or hostname then one or two lines of code may be all you need.

If the URLs change in a non-simple way, e.g. example.com?id=543 becomes example.com/widget then you'll need to rewrite requests for old URLs to an internal PHP (or other) script that looks up the new URL in an array or in a database and then sends the correct HEADER 301 pointing to the new URL.

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members