homepage Welcome to WebmasterWorld Guest from 54.204.231.110
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / WebmasterWorld / Webmaster General
Forum Library, Charter, Moderators: phranque & physics

Webmaster General Forum

    
301 on a Win2K server vs Linux server
Is this normal behaviour?
anallawalla




msg:360058
 10:11 am on Jun 18, 2003 (gmt 0)

A 301 on a client's IIS/Win2K server:

HTTP/1.1 301 Error
Location: http://www.example.com/
Server: Microsoft-IIS/5.0
Content-Type: text/html
Content-Length: 143

A 301 on my own site (Apache/Linux server and .htaccess):

HTTP/1.1 301 Moved Permanently
Date: Wed, 18 Jun 2003 09:25:27 GMT
Server: Apache/1.3.6 (Unix) FrontPage/4.0.4.3
Location: http://www.mysite.com/
Connection: close
Content-Type: text/html

Both were tested with the same tool on this site. Is the IIS site giving a truly permanent message (to a spider)?

- Ash

 

Jack_Straw




msg:360059
 12:22 am on Jun 19, 2003 (gmt 0)

It is easy to generate a 301 Anything in IIS. From asp:

<%
Response.Status = "301 Anything (could be Error)"
Call Response.AddHeader ("Location","http://www.site.com/newpage.asp")
Response.End
%>

The portion after the numeric status code is informational only. Anything can be put there. "301 Moved Permanently", or "301 Permanent Redirect" are commonly used. But "301 Error" is ok too. The important thing is the status code: 301.

anallawalla




msg:360060
 11:27 am on Jun 19, 2003 (gmt 0)

Thanks for that useful piece of info. In Apache/.htaccess I didn't type any words after 301 so I assumed that the "Moved Permanently" was a positive confirmation (albeit the string was probably hardcoded into Apache). The 301 "Error" text threw me because I have since found another IIS5 site whose query result is:

HTTP/1.1 301
Server: Microsoft-IIS/5.0
Date: Wed, 18 Jun 2003 15:26:10 GMT
Location: http:*//www.example.com/
Connection: Keep-Alive
Content-Length: 20272
Content-Type: text/html
Cache-control: private

A different client told me that his Win2K web host won't do 301s but can only do 302s. Any theories why?

- Ash

Krapulator




msg:360061
 1:14 pm on Jun 19, 2003 (gmt 0)

Theres no technical reason that they couldn't do it - but I have heard of webhosts doing this (not sure why).

You can always script them in asp as described by Jack_Straw above

lk125




msg:360062
 2:35 pm on Jun 20, 2003 (gmt 0)

I am having an issue with the duplicate content of my home page (ie. domain.com and www.domain.com).
I'm on a Windows server, and I have some options (below) regarding the redirect, but none seem to work very well. Can anyone offer any insight?

1. Global.asa file - The problem with this solution is it only works for server side pages. You would not have to change the file extension from .htm to .asp but you would have to map the .htm/.html extension to run in IIS like an ASP page.

2. IIS 301 Redirect - I thought this would be the solution, however, it requires two IIS accounts or two accounts on the same server. What you would have to do is in your DNS record have domain.com going to one IP (account) and www.domain.com going to another ip. Both would physically point to the same directory on the server. Then in IIS you would redirect www.domain.com to domain.com

3. make the change at the DNS record. Right now the A record for www.domain.com and domain.com point to an IP address (11.222.333.444) . This IP address points to the IIS virtual directory that points to the physical directory.

Thanks for any help.

Krapulator




msg:360063
 6:50 am on Jun 23, 2003 (gmt 0)

HI lk125,

Set up a new web site in your Internet Services manager. Tell it to use the domain.com address. Put an empty default.asp in the root directory.

Then set up a permanent (301) redirect from the file created above to the www.domain.com address.

Easy as pie.

Sticky me if you want more detailed instructions.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Webmaster General
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved