User login

MetaTraffic 2.0 Boxshot

Do not log certain directories

Posted by jrthor2 [July 30, 2003]

Is there a way to not log a specific directory? I have an admin site that uses our sites layout, but I don't want to track anything if people are using the Admin portion of our site. I tried using this in my include file:

Dim dir
dir = Request.ServerVariables("URL")
'response.write (Left(dir,6))
If Left(dir,6) <> "/admin" Or Left(dir,6) <> "/Admin" then
Server.Execute("/reports/track.asp")
End if

But is still appears to be logging.

Do not log certain directories

Hi,

I always use Script_Name server variable, but the url one should work as well. Here's how I would do it:

Dim dir
dir = Request.ServerVariables("script_name")
If LCase(Left(dir, 6)) <> "/admin" Then
Server.Execute("/reports/track.asp")
End If

I think that should work.

Regards,
~Chad