permalink and .htaccess

  • Unknown's avatar

    So each time you save the permalink settings it writes the .htaccess file, my question then is how do you add something like the following to stop spam domains because saving permalink settings overwrites.

    RewriteCond %{HTTP_REFERER} semalt.com [NC]
    RewriteCond %{HTTP_REFERER} buttons-for-websites.com [NC]
    RewriteCond %{HTTP_REFERER} 7makemoneyonline.com [NC]
    RewriteCond %{HTTP_REFERER} darodar.com [NC]
    RewriteRule .* – [F]

    so I would like the .htaccess to be permanently fixed as

    # 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]

    RewriteCond %{HTTP_REFERER} semalt.com [NC]
    RewriteCond %{HTTP_REFERER} buttons-for-websites.com [NC]
    RewriteCond %{HTTP_REFERER} 7makemoneyonline.com [NC]
    RewriteCond %{HTTP_REFERER} darodar.com [NC]
    RewriteRule .* – [F]

    </IfModule>

    # END WordPress

  • Unknown's avatar

    Hi support2013pastonchase,

    These forums are focused on helping users with their WordPress.com blogs, so if you have a WordPress.org blog, you may have better luck asking in the WordPress.org support forums.

    For the differences between WordPress.com and WordPress.org, you may wish to read the support article here:

    WordPress.com vs. WordPress.org

  • Unknown's avatar

    What if I tried something similiar in a plug in and now I get forbidden
    error 403? my site went down and I am a newb boob. huh hhuh!

  • The topic ‘permalink and .htaccess’ is closed to new replies.