Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Discussions > Crawling, indexing, and ranking > ASP 301 redirect to the root / without enless loop ?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  24 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
mmaillar  
View profile  
 More options Oct 24 2008, 7:47 pm
From: mmaillar
Date: Fri, 24 Oct 2008 16:47:15 -0700 (PDT)
Local: Fri, Oct 24 2008 7:47 pm
Subject: ASP 301 redirect to the root / without enless loop ?
 Hi Everybody,

I just realized that I have a different page rank for www.mywebsite.com
and for www.mywebsite.com/default.asp. I would like to combine them
into only one: www.mywebsite.com

From my default.asp page (wich is my default page off course...), do
you know a way to make a 301 redirect to the root / without doing an
endless loop ?

Thanks in advance,
Marc.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
webado  
View profile  
 More options Oct 24 2008, 8:02 pm
From: webado
Date: Fri, 24 Oct 2008 17:02:24 -0700 (PDT)
Local: Fri, Oct 24 2008 8:02 pm
Subject: Re: ASP 301 redirect to the root / without enless loop ?
See here:
http://www.jlh-design.com/2006/08/301-redirects-in-asp-on-iis-server/

On Oct 24, 7:47 pm, mmaillar wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mmaillar  
View profile  
 More options Oct 24 2008, 11:31 pm
From: mmaillar
Date: Fri, 24 Oct 2008 20:31:14 -0700 (PDT)
Local: Fri, Oct 24 2008 11:31 pm
Subject: Re: ASP 301 redirect to the root / without enless loop ?
Thanks, but unfortunately, this does not solve my problem. The link
you sent us is about how redirect a http://mywebsite.com to
http://www.mywebsite.com.

What I want to do is to redirect my http://www.mywebsite.com/default.asp
to http://www.mywebsite.com/

On Oct 24, 5:02 pm, webado wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
webado  
View profile  
 More options Oct 25 2008, 1:11 am
From: webado
Date: Fri, 24 Oct 2008 22:11:29 -0700 (PDT)
Local: Sat, Oct 25 2008 1:11 am
Subject: Re: ASP 301 redirect to the root / without enless loop ?
Read it again, it does both.

On Oct 24, 11:31 pm, mmaillar wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robbo  
View profile  
 More options Oct 25 2008, 11:24 am
From: Robbo
Date: Sat, 25 Oct 2008 08:24:19 -0700 (PDT)
Local: Sat, Oct 25 2008 11:24 am
Subject: Re: ASP 301 redirect to the root / without enless loop ?

Webado

I'm going to stick by big neck out (so that someone can chop it
off ???):

I believe that the method given at the resource you cited (and has
been cited repeatedly by various people) is not a complete solution to
the general problem of getting rid of the mention of [ default.asp ]
in URLs for domains on IIS / ASP servers.

Although it is very useful in dealing with the www/non-www issue, it
does not deal with the default.asp issue if you are not changing the
www/non-www.

So it will reditrect to the www version AND drop the [ default.asp ]
in URLs like:
http://tesol-direct.com/test301/default.asp

But it will not drop the [ default.asp ] in URLs with (unchanged) www
like:
http://www.tesol-direct.com/test301/default.asp

I shall be delighted if anyone can fully resolve the issue of unwanted
[ default.asp ] in URLs but I don't think we have it yet.

Robbo

On Oct 25, 6:11 am, webado wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
webado  
View profile  
 More options Oct 25 2008, 11:36 am
From: webado
Date: Sat, 25 Oct 2008 08:36:56 -0700 (PDT)
Local: Sat, Oct 25 2008 11:36 am
Subject: Re: ASP 301 redirect to the root / without enless loop ?
Doesn't this part handle default.asp (or equivalent) - more than as a
comment, that is?

HTTP_PATH = request.ServerVariables("PATH_INFO")

'Check if page is default.asp if so, redirect to "/".
'If other index page is used, such
'as index.asp the numbers in the right and len statement
'need to be changed, as well
'as the IF statment to indicate the index page.

If right(HTTP_PATH, 12) = "/default.asp" Then
TEMP_NUM = len(HTTP_PATH)-11
HTTP_PATH = left(HTTP_PATH,TEMP_NUM)
End If

I guess THE PROBLEM is the inability if IIS to return the correct
value for REQUEST_URI . I seem to have read that somewhere.

I cannot test this myself (no IIS serevr handy, no knowledge of asp
either) but what if you (also or instead of the script given above) do
these steps:
1) define another default index page, e.g. index.asp (no idea if you
need console access or special privileges for this, thsi might be the
trouble)
2) rename default.asp to index.asp - make sure no links point to
index.asp
3) make a new default.asp script which simply 301 redirects
unconditionally to the root (using the preferred canonical domain
form)

On Oct 25, 11:24 am, Robbo wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
webado  
View profile  
 More options Oct 25 2008, 11:39 am
From: webado
Date: Sat, 25 Oct 2008 08:39:38 -0700 (PDT)
Local: Sat, Oct 25 2008 11:39 am
Subject: Re: ASP 301 redirect to the root / without enless loop ?
Maybe it's more a matter of rethinking the IF structure. Test for
presence of default.asp first (if possible) and separately for www/non-
www .

On Oct 25, 11:24 am, Robbo wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robbo  
View profile  
 More options Oct 25 2008, 12:44 pm
From: Robbo
Date: Sat, 25 Oct 2008 09:44:55 -0700 (PDT)
Local: Sat, Oct 25 2008 12:44 pm
Subject: Re: ASP 301 redirect to the root / without enless loop ?

A bit before that coding, there is a conditional:

if left(Domain_Name, 3) <> "www" Then

IIS has no problem redirecting from mydomain.com to www.mydomain.com
(with or without the default.asp); the problem comes with redirecting
to the same URL but without the default.asp.

The basic problem, as I see it, is that even if you request a domain
root or folder URL WITHOUT default.asp, when you get into the coding
the IIS server variables cannot distinguish between with and without
the default.asp.

So if you request [ www.mydomain.com/ ]
IIS server variables will still report it as:
[ www.mydomain.com/default.asp ]

If you did change the default filename to (eg) home.asp or index.asp,
you would still have the same problem because IIS would, in effect,
insert the "missing" default filename just as it would for
[ default.asp ].   And in any case most webmasters with 3rd party
hosting cannot get into the Windows server control settings.

Robbo


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
webado  
View profile  
 More options Oct 25 2008, 1:22 pm
From: webado
Date: Sat, 25 Oct 2008 10:22:47 -0700 (PDT)
Local: Sat, Oct 25 2008 1:22 pm
Subject: Re: ASP 301 redirect to the root / without enless loop ?
Well the rationale behind changing the fiel name used as index is that
if you don't mention the new one anywhere after that, then Google
won't find it and won't index it.

On Oct 25, 12:44 pm, Robbo wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
webado  
View profile  
 More options Oct 25 2008, 4:27 pm
From: webado
Date: Sat, 25 Oct 2008 13:27:58 -0700 (PDT)
Local: Sat, Oct 25 2008 4:27 pm
Subject: Re: ASP 301 redirect to the root / without enless loop ?

What you actually want is REQUEST_URI if it exists.
But I believe this one is mysteriously missing from IIS.

On Oct 25, 4:20 pm, mmaillar wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robbo  
View profile  
 More options Oct 25 2008, 4:45 pm
From: Robbo
Date: Sat, 25 Oct 2008 13:45:59 -0700 (PDT)
Local: Sat, Oct 25 2008 4:45 pm
Subject: Re: ASP 301 redirect to the root / without enless loop ?

webado said:

> Well the rationale behind changing the file name used as index is that
> if you don't mention the new one anywhere after that, then Google
> won't find it and won't index it.

That's a good point - as long as you can keep the actual file name
secret!

And of course, for most webmasters, it involves getting the hosting
company tech staff to oblige by updating the server default settings.

mmaillar - if you are willing to spend a bit of cash, there is
a .htaccess-equivalent for IIS from a third-party supplier, but I
can't remember its name off hand!

Robbo


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
webado  
View profile  
 More options Oct 25 2008, 4:52 pm
From: webado
Date: Sat, 25 Oct 2008 13:52:15 -0700 (PDT)
Local: Sat, Oct 25 2008 4:52 pm
Subject: Re: ASP 301 redirect to the root / without enless loop ?
I think you mean the ISAPI Rewrite:
http://www.helicontech.com/isapi_rewrite/

On Oct 25, 4:45 pm, Robbo wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mmaillar  
View profile  
 More options Oct 25 2008, 9:08 pm
From: mmaillar
Date: Sat, 25 Oct 2008 18:08:23 -0700 (PDT)
Local: Sat, Oct 25 2008 9:08 pm
Subject: Re: ASP 301 redirect to the root / without enless loop ?
Unfortunately, I use a commercial host and am not authorized to
install ISAP Rewrite on their server... Already asked a couple of
weeks ago without success :-(

So, to sumarrize, my best option is to create a file named index.asp
with all the logic contained into default.asp. I put a 301 redirect to
this newly index.asp on the default.asp and done ? Are you sure I will
not loose my PR and so on ?

Thanks for your help,
Marc

On 25 oct, 13:52, webado wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
webado  
View profile  
 More options Oct 25 2008, 9:22 pm
From: webado
Date: Sat, 25 Oct 2008 18:22:01 -0700 (PDT)
Local: Sat, Oct 25 2008 9:22 pm
Subject: Re: ASP 301 redirect to the root / without enless loop ?
First of all make sure index.asp will  be a default index page shown
when nothign is specified.

Youc an figure out if index.asp will work as a default homepage with
higher priority than default.asp by making a subfolder somewhere and
putting in a sinple index.asp page. See if www.example.com/subfolder/
works and shows the content of index.asp . if it doesn't the whole
thing fails unless your hoster can reset the defautl homepage fr you
to be index.asp instead f default.asp.

Don't worry about pagerank. Currently I don't see your default.asp
page indexed, so it's not any kind of issue. It's no issue at all, on
the contrary,  if you do succeed in 301 redirecting the page.
 I

On Oct 25, 9:08 pm, mmaillar wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chibcha  
View profile  
 More options Oct 25 2008, 11:47 pm
From: Chibcha
Date: Sat, 25 Oct 2008 20:47:09 -0700 (PDT)
Local: Sat, Oct 25 2008 11:47 pm
Subject: Re: ASP 301 redirect to the root / without enless loop ?
They are indexed separately, with different cache dates, 18th and 21st
October

On Oct 26, 3:34 am, mmaillar wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chibcha  
View profile  
 More options Oct 25 2008, 11:52 pm
From: Chibcha
Date: Sat, 25 Oct 2008 20:52:15 -0700 (PDT)
Local: Sat, Oct 25 2008 11:52 pm
Subject: Re: ASP 301 redirect to the root / without enless loop ?
Correction - should be 20th and 21st. The page from the 18th is the
https version, also indexed and apparently https pages are indexed as
a duplicate with regard to other pages as well. That is a problem I
imagine you could take care of via redirects.

On Oct 26, 3:47 am, Chibcha wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mmaillar  
View profile  
 More options Oct 26 2008, 12:49 am
From: mmaillar
Date: Sat, 25 Oct 2008 21:49:14 -0700 (PDT)
Local: Sun, Oct 26 2008 12:49 am
Subject: Re: ASP 301 redirect to the root / without enless loop ?
Ok guys, I finnaly manage this using a session variable. Here is the
code I used:

If GetSess("GotRedirected") <> "TRUE" then
        SetSess "GotRedirected","TRUE"
        Response.Status = "301 Moved Permanently"
        Response.AddHeader "Location", "http://www.mywebsite.com"
else
        SetSess "GotRedirected","FALSE"
end if

The only inconvenient is that there is a redirection even when I type
the correct URL (I mean <http://www.mywebsite.com>) at the first time,
but hope this is OK from SEO standpoint.

Best,
Marc.

On 25 oct, 20:52, Chibcha wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
webado  
View profile  
 More options Oct 26 2008, 12:58 am
From: webado
Date: Sat, 25 Oct 2008 21:58:33 -0700 (PDT)
Local: Sun, Oct 26 2008 12:58 am
Subject: Re: ASP 301 redirect to the root / without enless loop ?
You left out the trailing slash ion yrou redirection, so there will be
yet a second 301 redirection, test again to the url without a trailing
slash, And then it times out.

http://oyoy.eu/page/headers/?full=1&url=http%3a%2f%2fwww.comptoirdenf...

On Oct 26, 12:49 am, mmaillar wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
webado  
View profile  
 More options Oct 26 2008, 1:00 am
From: webado
Date: Sat, 25 Oct 2008 22:00:06 -0700 (PDT)
Local: Sun, Oct 26 2008 1:00 am
Subject: Re: ASP 301 redirect to the root / without enless loop ?
Trouble is the same thing happens if I start with the proper url, with
trailing slash, because it redirects to the url withotu a trailing
slash and then times out.

http://oyoy.eu/page/headers/?full=1&url=http%3a%2f%2fwww.comptoirdenf...

This isn't good.

On Oct 26, 12:49 am, mmaillar wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mmaillar  
View profile  
 More options Oct 26 2008, 1:07 am
From: mmaillar
Date: Sat, 25 Oct 2008 22:07:51 -0700 (PDT)
Local: Sun, Oct 26 2008 1:07 am
Subject: Re: ASP 301 redirect to the root / without enless loop ?
But witihn usual browers (Firefox, IE, Safati) everything goes fine,
after a first redirection, I land to the expected page. Is this wrong
for SEO ?

On 25 oct, 22:00, webado wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mmaillar  
View profile  
 More options Oct 26 2008, 1:35 am
From: mmaillar
Date: Sat, 25 Oct 2008 22:35:29 -0700 (PDT)
Local: Sun, Oct 26 2008 1:35 am
Subject: Re: ASP 301 redirect to the root / without enless loop ?
Do the Search Engines reset their cookies and session between
redirections? If yes, I agree, my solution does not work. Could you
confirm ?

Tx
Marc.

On 25 oct, 22:07, mmaillar wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
JohnMu Google employee  
View profile  
 More options Oct 26 2008, 8:50 am
From: JohnMu
Date: Sun, 26 Oct 2008 05:50:48 -0700 (PDT)
Local: Sun, Oct 26 2008 8:50 am
Subject: Re: ASP 301 redirect to the root / without enless loop ?
Hi Marc and welcome to the groups!

So it looks like you've stumbled into one of the big issues with IIS
(and I've fought the battle for a long time as well). I believe (I'm
not certain) that the newest version of IIS can handle things a bit
better, but most hosters don't use that version and with the older
versions you can't tell if you're on "/default.asp(x)" or "/" -- you
can only tell the file name that is responding, which will be "/
default.asp(x)" (either .asp or .aspx, depending on what you're
doing). Using sessions will not work: search engines do not keep track
of session data and therefore will be stuck in infinite loops
(browsers might react differently).

The best solution is to make sure that there is absolutely no mention
of "/default.asp(x)" on your site, instead only mentions of "/". You
can confirm this by using a crawler such as Xenu's Link Sleuth.
However, take care that you do not use forms anywhere, because they
will generally return their results back to the file ("/
default.asp(x)").

Once you have had /default.asp(x) known and indexed, it's a bit more
complicated. The most important step is still to make sure that it's
not mentioned anywhere. With that done, it should over time drop out
of the index automatically, but that may take some time. That said,
it's not like your site is going to make a big jump if it doesn't have
"/default.asp(x)" indexed, so there's really no big rush :-).

One trick which I learned from JLH is to use a different default file
name (eg "main.aspx"). Depending on your setup, you may be able to
specify this with your hoster (I believe some control panel tools let
you change it). If so, you can have your "default.asp(x)" do a 301
redirect to "/" at all times, which will be processed by your
"main.aspx" (which shouldn't be linked anywhere, so it won't get
indexed).

Hope it helps -- good luck!
John


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mmaillar  
View profile  
 More options Oct 27 2008, 1:28 pm
From: mmaillar
Date: Mon, 27 Oct 2008 10:28:57 -0700 (PDT)
Local: Mon, Oct 27 2008 1:28 pm
Subject: Re: ASP 301 redirect to the root / without enless loop ?
Hi JohnMu,

I made the clean up yesterday, still have to fix few things here and
there but the "default.asp" URL does not appear anymore in my website.
So, if I understand correctly, the next step is to wait that this URL
goes away from Google index by itself ? If so, what about the PR I got
on this page, is it lost ?

Tx
Marc.

On Oct 26, 5:50 am, JohnMu wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mmaillar  
View profile  
 More options Oct 29 2008, 7:19 pm
From: mmaillar
Date: Wed, 29 Oct 2008 16:19:59 -0700 (PDT)
Local: Wed, Oct 29 2008 7:19 pm
Subject: Re: ASP 301 redirect to the root / without enless loop ?
Ok, I am almost there. Here is the summary:

  1. I created a secrete (for google engine) asp page with all the
default.asp logic

  2. I deleted my default.asp page

  3. On my hosting server, I declared a new asp page to track 404
errors. In this page, I just redirect everything to "http://
www.comptoirdenfance.com/"

This works perfectly. The only thing I would like to do is to be more
'fine grain' and display an error message when the original URL is not
"default.asp" (like in an usual 404 page). To achieve that, I've
tested the value for request.servervariables("URL"), but it gives me
the name of my 404 page so I couldn't do the job... :-(

If someone can tell me how to store the original URL before getting
into my 404 page, it would be perfect !

Thanks again for your assistance,
Marc..

On Oct 27, 10:28 am, mmaillar wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »