Jump to content

301 Redriect question


phplacky

Recommended Posts

I am transferring servers, but keeping my domain name. How can I effectively use a 301 redirect to capture all those old pages to send to my new home?

 

I read many articels about how to do it, such as http://www.tamingthebeast.net/articles3/spiders-301-redirect.htm stating to simply input redirect 301 /old/old.htm http://www.you.com/new.htm into your .htaccess file

 

But what I don't understand is:

 

  * The code " redirect 301 /old/old.htm http://www.you.com/new.htm " appears to be a direct file or folder location. If it will be my entire old server, do I have to add every page that will trigger this error? Or is there an easier way to say anytime it is triggered, just send "here"?

 

  * Will this work if the .htaccess file is on only my new server? I am concerned it may not capture the errors if it is on my old server, even though the "address" will still remain the same.

 

I'm new to this. Though it is a bit off topic of PHP, I hope it is elementary enough that anyone can offer me the advice I need!

Link to comment
Share on other sites

Well, I have a site with high search engine rankings. It has goggle indexed pages that will no longer exist. The presence of "page not found" will create 404 errors that will lose those valueable rankings. If I replace it with a 301 redirect the robots will register it as a page found, and keep the site's rankings.

 

As explained in: http://www.tamingthebeast.net/articles3/spiders-301-redirect.htm

Link to comment
Share on other sites

Scenario:

Google presents links via search engine "Best cupcakes in town (link: www.bestcupcakesintown.com/aboutus.htm)"

 

However, upon upgrading site and transferring servers that page link has been changed to www.bestcupcakesintown.com/about.htm, for simplicity.

 

That link on google, when clicked, now doesn't exist. It will give anyone a 404 error.

 

As describe on the site I referenced in my prior post, the the page states:

"Search engines have indexed your entire site and pages you're going to move or rename rank well. By altering these files, you run the risk of losing a lot of traffic and leaving visitors to your site who follow a search engine link with the dreaded "Error 404 - File not found".

 

A 301 redirect is the best way to go and I go into some detail on how to implement one in this tutorial, but first let's take a look at a couple of other strategies I often see mentioned around the web to get around the problem and why you shouldn't use them."

Link to comment
Share on other sites

1) If you want to redirect users from the old file location to the new one, these will need to be done individually. Otherwise, you could put a catch all in place that will redirect any request for a non existent file to a (single) file.

 

2) As long as your domain points to your new server, the old server will no longer get requests fro that domain.

Link to comment
Share on other sites

That doesn't help me at all.

 

I am aware that the old server will not get requests if the nameserver points to your new one.

And, the whole thread was directed towards asking how I catch all 301 redirect for all old page links being accessed on my new server, if it is possible.

 

If you know how to solve this issue, please, let me know. I'm all ears :)

 

Otherwise...... anyone else want to give it a stab?

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.