Welcome to WebmasterWorld Guest from 18.206.168.65

Forum Moderators: ocean10000

Message Too Old, No Replies

How to best set up 410 response in Win 2003 Enterprise, IIS 6

IT guy on vacation and we need help

     
5:20 pm on Jul 23, 2009 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 24, 2005
posts: 178
votes: 0


We redesigned a site from PHP to ASP and there are some orphaned PHP pages. They don't correspond to anything on the new site, so a 301 really isn't appropriate.

So we would like to 410 them and tell Google to blow them away.

a) How does one set that up?

b) We should do a 410 for each of the 8 pages, right? How is that done?

Thanks

5:38 pm on July 23, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 1, 2005
posts:732
votes: 0


You can create new pages with the old file names and use the following code in them:

<%@ Language=VBScript %>
<%
Response.Status="410 Gone"
%>

You'll also need to set up IIS so that it runs files with a .php extension as ASP files. Here is a thread on running a .html file as ASP [webmasterworld.com] which shows how to map extensions in IIS application configuration.

5:48 pm on July 23, 2009 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 24, 2005
posts:178
votes: 0


Thanks Marcel. I will pass this along. Appreciate the help.
7:33 pm on July 23, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 1, 2005
posts:732
votes: 0


Sorry, I forgot to add; if the old files were accesible by the folder and not directly referenced as .php (ie. www.example.com/subir/ instead of www.example.com/file.php)

then you can just create default.asp files with the above code and place them in the folders, and not bother with mapping .php to ASP.

9:44 pm on July 23, 2009 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 24, 2005
posts:178
votes: 0


Thanks Marcel, this is what we needed.