homepage Welcome to WebmasterWorld Guest from 54.166.65.9
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

    
IIS 301 redirect
Moff




msg:941256
 10:11 am on Mar 16, 2004 (gmt 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

 

bakedjake




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

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.

tgone




msg:941258
 7:32 pm on Mar 24, 2004 (gmt 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?

bakedjake




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

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.

tgone




msg:941260
 9:12 pm on Mar 24, 2004 (gmt 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?

pageoneresults




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

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]

tgone




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

pageoneresults

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

Thanks

John

pageoneresults




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

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
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