Forum Moderators: phranque
just a quick one
if I wanted to exclude a domain name from my stats using regex how would I go about it?
let's say the domain is excludeddomain.com and I want to skip every request from it's subdomain as well (ie. sub1.excludeddomain.com ; sub2.excludeddomain.com ...)
would this remove all of them?
REGEX[^\.exludeddomain\.com$]
Thanks guys/gals
Leo
some more info about my problem - might help you help me :)
It's basically the SkipHosts function in awstats that I want to tweak. I want to remove the automatic accessibility checks that are run every month from my stats.
as an example on how to use it - the developer gave this:
# Example: "REGEX[^.*\.localdomain$]"
I am just not sure how to modify this function to exlude subdomains as well (may be they already are).
Could you also tell me the purpose of the $ sign? is it use to match any TLD?
Thanks for your help - it is much appreciated.
Leo
The patterns Caterham gave you should match any subdomain, because ".*" means "match anything", and omitting the start anchor is equivalent to anchoring a pattern starting with ".*".
More information on regular expressions is available in the tutorial cited in our forum charter.
Another question is what does this AWStats code exclude? If you wish to exclude referrers and the code is intended to exclude server hostnames, then the pattern may be working, but it is not checking the class of variable you expect it to.
Jim