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

  • Thread starter Thread starter DC
  • Start date Start date
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
 
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...
 
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.
 
Back
Top