If you have a hosting company and you install WordPress, the webhost will likely create a .htaccess file to handle WordPress.
A sample file looks like the one below:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
In order to add a 301 redirect for example, you have to add it in the IfModule block, but above the config for WordPress. Immediately after the RewriteEngine On line, you can add your config for the redirect(s).
A modified .htaccess file with a redirect is displayed below:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
#####################################
# 301 REDIRECTS #
#####################################
RewriteCond %{REQUEST_URI} /articles/linux/how-do-i-passwordless-ssh.htm
RewriteRule ^(.*) http://www.mytechforum.com/unix/how-do-I-passwordless-ssh/ [L,R=301]
#####################################
# WordPress Config #
#####################################
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Without putting the redirect in the correct location, it will not work as expected.
product marketing
July 15, 2010 at 11:20 am
I just wanted to comment your blog and say that I really enjoyed reading your blog post here. It was very informative and I also digg the way you write! Keep it up and I’ll be back to read more soon mate
Dick Delarme
July 17, 2010 at 6:33 am
I now possess the answers to my questions – at last! Thank you to get a fantastic web page. Gratefully, Beth
Margret Darwich
July 28, 2010 at 8:27 pm
What a great post
Clubs AZ
August 9, 2010 at 8:30 pm
Really informative blog post here my friend. I just wanted to comment & say keep up the quality work. I’ve bookmarked your blog just now and I’ll be back to read more in the future my friend! Also nice colors on the layout it goes well with the blog in my humble opinion 🙂
joomla cpanel
August 13, 2010 at 3:18 am
I’m just googled around, and found your site. I’m very interested. Where can I find more info? Thank you!
bluehost review
August 13, 2010 at 10:52 am
Thats lovely stuff you have written up on this blog. Been hunting for articles on this everywhere. Nice blog
Telefon Schnurlos
August 15, 2010 at 9:12 am
the useful advice you provided helps my investigation for my company, thanks.
Valda Nush
August 17, 2010 at 9:09 am
Great site!!!
Tee Hamburg
August 17, 2010 at 2:11 pm
This is the best blog I have ever read thank you!
seo
September 3, 2010 at 4:26 pm
Thanks for writing this I’ll tell my partner and see what she thinks.
bonus codes
September 4, 2010 at 6:32 pm
A friend recommended that I check out your site. I’m glad that I’m here.
Poker Download
September 12, 2010 at 7:47 am
I seldom leave comments on blogs, but you really impress me, also I have a few questions like to ask, what’s your contact details?
-Johnson
shanghai escort
September 13, 2010 at 3:25 pm
I’m impressed!!! Really informative blog post here my friend. I just wanted to comment & say keep up the quality work. I’ve bookmarked your blog just now and I’ll be back to read more in the future my friend! Also nice colors on the layout, it’s really easy on the eyes.
replica ulysse nardin watches
September 14, 2010 at 4:28 am
oh cool, this information is really useful and definately is comment worthy! hehe. I’ll see if I can try to use some of this information for my own blog. Thanks!
replica patek philippe watches
September 14, 2010 at 5:18 am
oh cool, this information is really useful and definitely is comment worthy! hehe. I’ll see if I can try to use some of this information for my own blog. Thanks!
chanel bags
September 14, 2010 at 8:59 am
Wow, I found this site on yahoo searching for something completely different- now I’m gonna need to go through the archives XD So much for my spare time today, but this was a truly great find.
cornell university college
September 22, 2010 at 10:35 pm
I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success.
Bree Public
September 27, 2010 at 7:19 pm
Good to find out you back again. And again having an interesting posting.
marketing experts
October 5, 2010 at 4:12 am
I got to this page through Facebook (one of my friends posted it). After checking your article, I then clicked Like and also reshared it.