Welcome to WebmasterWorld Guest from 54.242.224.250

Forum Moderators: ocean10000

Message Too Old, No Replies

IIS 301 redirect

     
10:11 am on Mar 16, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 21, 2004
posts:48
votes: 0


Hi

Hope this is in the right place, couldnt find a forum on IIS.

I have a client who currently uses an ASP system on their server. Index.asp is their default homepage. The trouble is that Google is still reading index.html and awarding the HTML page with all the PR, links etc..

Previously the HTML page had been an on page javascript redirect, which to me sounded like a bad idea.

I advised the client to remove the index.html completely as the page was not required and impliment a server side 301 redirect to the .ASP page.

Trouble is im told that IIS is only capable of A server redirect at the folder level. If this is true is there any other way to 301 index.html to index.asp?

Thanks for your help

6:30 pm on Mar 16, 2004 (gmt 0)

Administrator from CA 

WebmasterWorld Administrator bakedjake is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 8, 2003
posts:3878
votes: 56


In IIS Admin:

1. Browse the website you want to do the redirect for.
2. In the right pane, right click on the file you want to redirect, and click "Properties"
3. Under the "File" tab, hit the radio selection "A redirection to a URL"
4. Put the target in the "Redirect to" textarea.
5. Make sure "The exact URL entered above" and "A permanent redirection for this resource"

That should give you a 301 nicely.

7:32 pm on Mar 24, 2004 (gmt 0)

New User

10+ Year Member

joined:Mar 24, 2004
posts:12
votes: 0


Hi bakedjake

I can see what one ought to do with your concise instructions. This happens locally of of on my local IIS server. How do i then upload the data.

Also what happens when the page you want to redirect is not an asp page but is a normal html page that is being hosted on an IIS server?

8:23 pm on Mar 24, 2004 (gmt 0)

Administrator from CA 

WebmasterWorld Administrator bakedjake is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 8, 2003
posts:3878
votes: 56


Also what happens when the page you want to redirect is not an asp page but is a normal html page that is being hosted on an IIS server?

Same instructions. Right click on the page you want to redirect.

9:12 pm on Mar 24, 2004 (gmt 0)

New User

10+ Year Member

joined:Mar 24, 2004
posts:12
votes: 0


Forgive my ignorance but to do a redirect like this one would need to be hosting your own site. What do you do if your site is hosted elsewhere and you don't have control of the IIS Admin.

Is there a way to redirect the individual pages?

9:18 pm on Mar 24, 2004 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member pageoneresults is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 27, 2001
posts:12169
votes: 56


Is there a way to redirect the individual pages?

There are various methods of redirecting pages. The best way is to do it at the server level. If you don't have access or cannot get your host to implement these for you, then you may have no other option. Unless of course they are old asp pages redirecting to new asp pages. Then you can use this...

<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.example.com/new-page.asp"
%>

If its ASP.NET, you would do this...

<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://www.example.com/new-page.asp");
}
</script>

Either one of those scripts needs to go on the old asp page above the opening

<html>
tag.

Always double check your work and make sure your redirects are returning the proper server headers.

Server Header Checker [searchengineworld.com]

9:44 pm on Mar 24, 2004 (gmt 0)

New User

10+ Year Member

joined:Mar 24, 2004
posts:12
votes: 0


pageoneresults

Thanks for the info, what does one do in the case of html pages?

Thanks

John

10:09 pm on Mar 24, 2004 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member pageoneresults is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 27, 2001
posts:12169
votes: 56


Thanks for the info, what does one do in the case of html pages?

Redirect at the server level is the only option I believe you have. It's a simple process and shouldn't take your host more than one minute to do. bakedjake provided the instructions above.