Printer Friendly Version
Email this thread to a friend
|
Featured Web Site Template |
|
There are 0 guests and 1 members in the forums right now.
Reflects user activity within the last 5 minutes
|
|
| Member |
Message |
johnak
Joined: Aug 10, 2004
# Posts: 1
|
Posted: 08/10/2004 05:55 pm
I'm working on implementing a 301 re-direct on our site. After some playing around I found if I do it in IIS, IIS returns a "301 Error". Everywhere else I've looked says to set it to "301 Moved Permanently". Do the SE's care about the message or just the status code?
Appreciate any help...
John
|
 |
g1smd
Moderator
Joined: Jul 28, 2002
# Posts: 10183
|
Posted: 08/11/2004 01:11 pm
What they read is the code and words in the HTTP header... the stuff that the server sends before it sends out any HTML page after.
Use an online HTTP sniffer to see exactly what is being sent in the HTTP header.
|
 |
landyman
Joined: Aug 12, 2004
# Posts: 6
|
Posted: 08/12/2004 05:57 pm
Johnak -
I also had this problem with the "301 Error". After I received it, the old site was banned from Google and the new one was never indexed. After checking for every possible violation, the 301 error was all I could come up with as a problem. I know that they check the status codes, but the status text that is returned was a source of discussion. I believe that SE's look at the status text also. I would recommend getting it to return a "Moved Permanently".
I got it to return the correct code and text and the site was indexed. It took just over 2 months to get the new site indexed. I'm pretty sure this was the reason, however, since this is the only thing we changed on the old or new sites.
I hope this helps you out a little.
|
 |
g1smd
Moderator
Joined: Jul 28, 2002
# Posts: 10183
|
Posted: 08/26/2004 02:04 pm
I got it to return the correct code
How did you do that? What exactly did you do?
|
 |
landyman
Joined: Aug 12, 2004
# Posts: 6
|
Posted: 08/27/2004 03:21 pm
Since the old site was all in html, I associated the html pages to be read through the ASP engine.
To do this, open up the IIS manager. Right Click on the website you want to edit (the old one, in this case) and choose "properties". Click on the "Home Directory" tab. Click the "Configuration" button and a new window will open with the extensions and their associated .dll files. Add a new extension mapping by pressing the "Add" button. Put in .html for the extension field, and then put the .asp information for the other fields.
Now, .html files will be parsed with the asp engine.
After that, I put asp code at the top of the pages that did the redirect and returned the correct text:
<%
Response.Status = “301 Moved Permanently”
Response.addheader "Location", "http://www.newdomain.com/newdirectory/newpage.html"
Response.End
%>
Doing this got the redirect to show up properly.
|
 |
g1smd
Moderator
Joined: Jul 28, 2002
# Posts: 10183
|
Posted: 08/28/2004 12:25 am
Useful info.
Anyone want to add the equivalent PHP code (for those with PHP on Apache, but without access to the .htaccess file)?
|
 |
seo tester
Joined: Aug 23, 2004
# Posts: 42
|
Posted: 08/28/2004 09:59 pm
I believe this will do it in PHP:
<?php
header("HTTP/1.1 301 Moved Permanently" ;
header("Location: http://www.domain.com/page.html" ;
exit();
?>
|
 |
wwf
Joined: Aug 28, 2004
# Posts: 1
|
Posted: 08/30/2004 12:25 am
Hi
It may be.Actually 301 error is for permanent redirection and 302 error for temprory redirection in apache .
[ Message was edited by: wwf 08/30/2004 01:48 am ]
|
 |
g1smd
Moderator
Joined: Jul 28, 2002
# Posts: 10183
|
Posted: 08/30/2004 11:18 am
Yes. That is what 301 and 302 do.
If you want to tell the search engine that your site or page has moved, and get the new one reindexed in its place, then you must use a 301 redirect.
|
 |
You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
- You have not yet logged in, or registered properly as a member
- You are a member, but no longer have posting rights.
- This is a private forum, for which you do not have permissions.
If you are a recent member, it's possible that you simply have not yet confirmed your account. Please
check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions
contained within.
If you cannot find this message, click here to Re-Send it.
|
If you are still experiencing problem, please read the
Login Assistance
Article for some advice on what may be causing your login not to work properly.
|
Switch to Advanced Editor and ...
Create a New Topic
or Reply to this Thread
|
|