So... If you are saying that you want to disable someone calling a page
that is used only as an included page? For example, you have TheStuff.asp,
that is used as content on a page or whatever. Instead of someone calling
www.YourDomain.com/TheStuff.asp, you want it to redirect to the containing
page or another page?
If that is what you are asking then try this code in your included
pages.....
<%
ThisPage = Request.ServerVariables("URL")
IncludedPage = "TheStuff.asp"
If LCase(ThisPage) = LCase(IncludedPage) Then
Response.Redirect "SomeWhereElse.asp"
End If
%>
Soren
Thierry Lavall�e <[EMAIL PROTECTED]>
09/24/2004 08:51 AM
Please respond to active-server-pages
To: "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]>
cc:
Subject: Re: [ASP] Not run directly, only through include
Hi Adrian,
I was sure that with HTTP headers we could pull the requested URL with the
calling script name and compare it somehow with the name of the current
file.
Thanks!
--
Thierry
---> Adrian Forbes - ITD, 9/24/04 11:40 :
> As INCLUDES are done before ASP code is run you can't really tell if
> something is a result of an INCLUDE or not.
---------------------------------------------------------------------
Home : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
Post : [EMAIL PROTECTED]
Subscribe : [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
---------------------------------------------------------------------
Yahoo! Groups Links
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/17folB/TM
--------------------------------------------------------------------~->
---------------------------------------------------------------------
Home : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
Post : [EMAIL PROTECTED]
Subscribe : [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
---------------------------------------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/active-server-pages/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/