Wordpress .httaccess redirect

by andrej
3 replies
I want to redirect 2 affiliate links on my Wordpress website using the .httaccess file. By default the .httaccess file looks the following:

PHP Code:
# 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>

# END WordPress 
I wonder if everything will work fine if I add 2 lines (the redirect codes) at the bottom? It would look the following way:

PHP Code:
# 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>

# END WordPress


redirect 301 /hostgator http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=andrej1
redirect 301 /bluehost http://www.bluehost.com/track/andrej1 
Will my Wordpress website work without any problems? Can I do this?
#httaccess #redirect #wordpress

Trending Topics