Google analytics and .htaccess replacement

Discussion in 'Hosting Services / Control Panel' started by Owen Ransen, Jan 12, 2016.

Tags:
  1. In order to remove some spurious stats from my analytics some people have suggested that I do this inside .htaccess:

    ## SITE REFERRER BANNING
    RewriteCond %{HTTP_REFERER} Traffic2cash.xyz [NC,OR]
    RewriteCond %{HTTP_REFERER} Traffic2cash.xyz
    RewriteRule .* - [F]

    I'm no WEB wizard but I'm under the impression that ASP sites don't have .htaccess. So how do I achieve the above? Be gentle. I'm new at this stuff...
     
  2. Good question Owen, I have all kinds of trash traffic being sent to my site for some reason and it's over inflating my traffic stats. Would be good if there was a way to remove specific traffic from Google analytics and I'm new to ASP like you.
     
  3. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    The .htaccess file is used for configuration in Linux/UNIX/Apache based hosting/sites. It has very limited or no effect in Windows/IIS environments. The only program that I know that can make use of it is WordPress. Since it looks like you're trying to implement a rewrite rule, the IIS equivalent is URL Rewrite, and it is stored in the web.config file. In fact, I would say the web.config file is the equivalent of .htaccess in Linux/UNIX. Any configuration settings should be set in there.
     
    mjp likes this.

Share This Page