[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

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


Closed Thread
 
LinkBack Thread Tools
Old 08-13-2008, 12:42 PM   #1 (permalink)
NamePros Member
 
Join Date: Jan 2007
Posts: 31
0.00 NP$ (Donate)

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, 05:22 PM   #2 (permalink)
Senior Member
 
Peter's Avatar
 
Join Date: Nov 2003
Location: Scotland
Posts: 4,900
0.60 NP$ (Donate)

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, 05:32 PM   #3 (permalink)
NamePros Legend
 
weblord's Avatar
 
Join Date: Dec 2005
Location: Philippines - www.Nabaza.com
Posts: 19,840
21,700.43 NP$ (Donate)

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...

"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.
Quote:
Originally Posted by Peter
weblord is offline  
Old 08-14-2008, 12:20 PM   #4 (permalink)
NamePros Member
 
Join Date: Jan 2007
Posts: 31
0.00 NP$ (Donate)

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, 04:09 PM   #5 (permalink)
Senior Member
 
Peter's Avatar
 
Join Date: Nov 2003
Location: Scotland
Posts: 4,900
0.60 NP$ (Donate)

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 10:59 PM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85