Forum Moderators: open

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

         

jastra

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

10+ Year Member Top Contributors Of The Month



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

marcel

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

WebmasterWorld Senior Member 10+ Year Member



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.

jastra

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

10+ Year Member Top Contributors Of The Month



Thanks Marcel. I will pass this along. Appreciate the help.

marcel

7:33 pm on Jul 23, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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.

jastra

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

10+ Year Member Top Contributors Of The Month



Thanks Marcel, this is what we needed.