Posts Tagged ‘seo’

Add a 301 redirect, the SEO friendly way to go.

Wednesday, July 8th, 2009

If you're reading this then you're well aware of WHY you need a 301 redirect for your canonical-url's, so there's no reason to get into duplicate content and how/why Google does things.** You're here for the ScriptBit. So, how do you set up your .htaccess file? The answer is "incredilby easily". We'll use this site as an example.

Put the following into the .htaccess file (note the dot at the beginning) of your DocRoot:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^scriptbits.net [NC]
RewriteRule ^(.*)$ http://www.scriptbits.net/$1 [L,R=301]

That's it. Simple, huh?

**Because they can