WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to allow cloaked links in .htaccess file with blog protection (3 posts)

  1. lakshnews
    Member
    Posted 2 years ago #

    Hi!
    I recently protected my wordpress blog by installing askapache passpro and then adding the lines below. Thing is I'd like to cloak my affiliate links and I need to add the lines --
    RewriteEngine On
    RewriteRule ^go/([/_0-9a-zA-Z-]+)$ link.php?id=$1
    -- to the lines below. Could you please tell me what is the right way to do this?

    I'm not a coder and I tried a number of things but the redirect doesn't work (I added a link.php file by following instructions here http://netprofitstoday.com/blog/how-to-cloak-your-affiliate-links-the-easy-way/) Just to give you the full picture!

    I'd be really grateful if you could let me know how to add the lines to cloak links in the .htaccess file correctly to the existing lines that protects the blog from hackers.
    Thank you! Lakshmi

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

    <files .htaccess>
    order allow,deny
    deny from all
    </files>

    <files wp-config.php>
    order allow,deny
    deny from all
    </files>

    # END WordPress

  2. adpawl
    Member
    Posted 2 years ago #

    try eg.

    # BEGIN WordPress
     <IfModule mod_rewrite.c>
     RewriteEngine On
     RewriteBase /
     RewriteRule ^go/([/_0-9a-zA-Z-]+)$ link.php?id=$1 [L]
     RewriteRule ^index\.php$ - [L]
     RewriteCond %{REQUEST_FILENAME} !-f
     RewriteCond %{REQUEST_FILENAME} !-d
     RewriteRule . /index.php [L]
     </IfModule>
    
    <files .htaccess>
     order allow,deny
     deny from all
     </files>
    
    <files wp-config.php>
     order allow,deny
     deny from all
     </files>
    
    # END WordPress
  3. lakshnews
    Member
    Posted 2 years ago #

    Hi,

    Thank you for replying - It doesn't work though. The page remains blank...

    I'd be grateful for any other suggestions you have?

    Thanks again, Lakshmi

Topic Closed

This topic has been closed to new replies.

About this Topic