• Resolved powerj

    (@powerj)


    I am trying to block semalt and buttons-for-website.com from my analytics.

    After some research I have my .htaccess looking like this. Is this correct and I assume it will take Google some time to register the change?

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # block visitors referred from semalt.com, buttons-for-website.com
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} semalt.com [NC]
    RewriteCond %{HTTP_REFERER} buttons-for-website.com [NC]
    RewriteRule .* – [F]

    # END WordPress

Viewing 4 replies - 1 through 4 (of 4 total)
  • You are closing your mod_rewrite a little prematurely.

    Perhaps this may work better?

    <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteBase /
    
      RewriteRule ^index\.php$ - [L]
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule . /index.php [L]
    
      RewriteCond %{HTTP_REFERER} semalt.com [NC]
      RewriteCond %{HTTP_REFERER} buttons-for-website.com [NC]
      RewriteRule .* - [F]
    </IfModule>

    Thread Starter powerj

    (@powerj)

    Thank you so much. Does it take Google a little while to respond to the change?

    Thread Starter powerj

    (@powerj)

    Actually disregard that last question – Just realised I’m being dumb

    No worries ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘.htaccess file block semalt etc’ is closed to new replies.