NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page redirect index.asp to / with IIS

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 08-13-2008, 01:42 PM THREAD STARTER               #1 (permalink)
NamePros Member
Join Date: Jan 2007
Posts: 31
CHEECHDIAZ is on a distinguished road
 



redirect index.asp to / with IIS


I'm looking to hire someone who knows how to do a se friendly 301 redirect from my index.asp file to /.

It appears as if Google sees these pages as two.

I'm willing to pay to have someone do it. Please note that it is a windows server and not as easy to do as other types.

Please reply with your quoted price and how you plan to do it. Thanks
CHEECHDIAZ is offline  
Old 08-13-2008, 06:22 PM   #2 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,069
Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute
 


Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
Do you have admin rightson the server?

Does it have the IIS equivalent module for mod_rewrite installed?

If you do not you will need to create a conditional statement within index.asp to check if index.asp is within the path the user is veiwing. If it is then do a redirect using something like what is in the following page http://www.seoconsultants.com/tips/asp/301.asp
__________________
Manage your portfolio using my new Domain Portfolio Management script.
Securing Your Domain Name From Theft
Peter is offline  
Old 08-13-2008, 06:32 PM   #3 (permalink)
NamePros Legend
 
weblord's Avatar
Join Date: Dec 2005
Location: Philippines - www.Nabaza.com
Posts: 19,785
weblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatness
 


Autism Protect Our Planet
just follow the instructions it will save you some money.

Quote:
Take the old-page.asp that is being renamed or moved and remove all of the code. Place the below code in place of the old HTML/XHMTL.

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

In the above 301 redirect example, you need to change the Location to the URI of your new-page.asp. Include the full URI path unless you are redirecting to a root level page (index.asp, default.asp, etc.). If you are setting up a 301 redirect for a root level page, keep the URI short and without the index.asp file name. For example...
????: NamePros.com http://www.namepros.com/programming/503405-redirect-index-asp-to-with-iis.html

"Location", "/sub-directory/"

Once you've included the above code at the top of your old-page.asp, verify that it is returning the proper server header response using our Check Server Headers tool. You should see a recursive response (2 server responses) returned from the server header that look similar to this...

#1 Server Response: /old-page.asp
HTTP Status Code: HTTP/1.1 301 Moved Permanently
Server: Microsoft-IIS/5.0
Date: Fri, 04 Jun 2004 03:11:15 GMT
Location: /new-page.asp
Connection: Keep-Alive
Content-Length: 0
Content-Type: text/html
Cache-control: private

Redirect Target: /new-page.asp

#2 Server Response: /new-page.asp
HTTP Status Code: HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Fri, 04 Jun 2004 03:11:15 GMT
Connection: Keep-Alive
Content-Length: 14268
Content-Type: text/html
Cache-control: private

The first server response above is telling you that the referenced URI (old-page.asp) has been Moved Permanently. This is evident due to the HTTP Status Code of 301. The Moved Permanently is referred to as a Reason Phrase. The Reason Phrase can be any value although the official term for Status Code 301 is Moved Permanently. Other unofficial 301 Reason Phrases may be; Error or Permanently Moved.

The second server response is telling you that the Redirect Target (Location) is OK. This is how it should be when permanently redirecting an old-page.asp to a new-page.asp. The OK is the official Reason Phrase for Status Code 200.

In reference to spidering entities (crawlers, robots, spiders), the ASP code above and the ASP.NET code below will send a server header response of 301 Moved Permanently and, is instructing the spiders to update their index and replace the old URI (old-page.asp) with the new URI (new-page.asp). This could take several months before results are final.
ASP.NET Version

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

Note: If your 301 is set up properly, you should not be able to browse to the old-page.asp (unless you have auto redirects turned off in your browser). The browser will automatically redirect you to the new-page.asp. This is of course the intended behavior.

To be on the safe side, you could always leave your old-page.asp in place and include something like this to alert visitors (who have auto redirects turned off) that the page has been moved and to update their link references...

The resource you've requested /old-page.asp has been moved to a new location as of 2004-12-01. Please update your bookmarks and/or links to reflect the new location of this resource.

New URI Reference: /new-page.asp

This old page will be removed on 2005-02-01 at which time we will assume our visitors have updated their links and the spidering entities have updated their indexes. At that time, this old page will return a 404 Not Found status. Thank you in advance for your understanding and continued support.

Edward Lewis, System Admin

Remember to insert your 301 Moved Permanently code above all other code on the page. For those who have auto redirects turned off, they will see your message above along with the new URI reference. Everyone else will be automatically redirected to the new URI reference.
__________________
Nabaza.com - Amaia
weblord is offline  
Old 08-14-2008, 01:20 PM THREAD STARTER               #4 (permalink)
NamePros Member
Join Date: Jan 2007
Posts: 31
CHEECHDIAZ is on a distinguished road
 



The above seems to cause a loop since it's going from page a to page a (not a to b)

index.asp and / are the same page.

Google is seeing them as different/duplicated pages.

Quote:
Do you have admin rightson the server?

Does it have the IIS equivalent module for mod_rewrite installed
I have shared hosting with GoDaddy... I'm not too technical when it comes to that stuff, that's why I rather pay to have someone who knows do it.
CHEECHDIAZ is offline  
Old 08-14-2008, 05:09 PM   #5 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,069
Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute
 


Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
you need to run through an if case and check to see if the url the user has used includes index.asp if so do te redirect if not continue as normal. I can do this in PHP easily but not overly familiar with asp.
__________________
Manage your portfolio using my new Domain Portfolio Management script.
Securing Your Domain Name From Theft
Peter is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 05:33 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger