Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default.asp? or /?

Status
Not open for further replies.

fhlee

Technical User
Jan 23, 2002
133
TW
Hi there,
Due to some SEO requirement, I have a very peculiar request... was scratching my head over this for a while but to no avail...

Does anyone know if I can tell, from within my ASP page, if the CURRENT page being run is default.asp or / ?

For example, google treat and as different pages. Is there anyway to tell if the current page being view is or (no default.asp --noting that default.asp is set as one of the default page).

Strange question? Hope someone can help me with this. Thanks!

-fhlee

~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
 
If you want to check on the client side, use Javascript and check the location.href property.

On the server side, the URL is part of the server variables collection.

Lee
 
Hi Lee,
Thanks for replying. I am referring to the Server-Side.

I checked the ServerVariables (SCRIPT_NAME), but when I load the default.asp & just the /. The variable (SCRIPT_NAME) is still the same... Any other ways? Thanks in advance :)

- fhlee

~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
 
Hi trollacious,
Thanks for replying. I tried. BOTH SCRIPT_NAME and URL returns "/default.asp" for BOTH and :( In fact, I checked all the ServerVariables... I can't seems to find a variable there that can differentiate this particular case :(


regards,
- fhlee


~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top