Welcome to WebmasterWorld Guest from 54.90.204.233

Forum Moderators: ocean10000

Message Too Old, No Replies

just need to redirect a few pages

i don't need a rule.. just a 1 to 1 example

     
1:44 am on Jun 11, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 3, 2003
posts:809
votes: 0


I have a client with an 8 page website, they have changed all their page names for some reason, with no real pattern.

I am thinking ot do a url1 to url2 rule for each old url, so inbound links to old urls still go somewhere.

I can't find how to do this - so much about how to do it in apache mod rewrite...

can anyone help?

Its on IIs / 6
4:52 am on June 11, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

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


Just put this code on the (old) page you want to redirect:

Classic ASP
<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://www.example.com/newpage/"
%>


ASP .NET
<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://www.example.com/newpage/");
}
</script>
9:03 am on June 11, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 3, 2003
posts:809
votes: 0


problem.

they are .html pages
10:06 am on June 11, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

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


Do the old URLs also have the .html extension? or are they the default document within a directory?

ie. are the URLs example.com/category.html or example.com/category/

If the former you will need to configure IIS to handle the .html extension via the asp.dll or invest in ISAPI_Rewrite

If the latter, you can just put another default document in that folder (default.asp) and add the code.
4:29 pm on June 11, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:Dec 4, 2009
posts:186
votes: 0


If the old files are HTML and the new are ASP can you use a META REFRESH in the old ones?

<meta http-equiv="refresh" content="0;url=http://www.example.com">
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members