Using ASP HTTP_REFERER server variable to choose between 2 differentincludes files?

D

DC

Is ther an easy way of using the HTTP_REFERER server variable to choose
between 2 different includes files?

Eg:

<%
If HTTP_REFERER="Url 1" then

<!--#include virtual="/includes/menustyle1.html" -->

else

<!--#include virtual="/includes/menustyle1.html" -->

EndIf
%>

Obviouslythe above wont work due to bracketing, but is there an easy way
around this?

Thanks in advance,

DC
 
M

Mark Rae [MVP]

Is there an easy way of using the HTTP_REFERER server variable to choose
between 2 different includes files?

Before you go much further with this, I should point out that HTTP_REFERER
cannot be relied upon at all on the public Internet, as more and more ISPs
are stripping this off web requests...
 
M

Mark Fitzpatrick

Not like this. Keep in mind, asp commands are processed after things like
server side includes so this method will result in you having the two files
included in the page before ASP begins processing.

Just an FYI, this is not the ASP newsgroup, this is ASP.Net so you won't get
many helpful answers here. For questions regarding classic ASP you may want
to go to the microsoft.public.inetserver.asp.general newsgroup instead.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top