views:

65

answers:

3

Hi,

I have a website with around 500 html pages. I have now posted all these html pages into my blog as blog posts. I now want to now redirect users from the page to the blog. I could do that using mod_rewrite or JavaScript

Since Google will re-index these posts, which of the these two methods would be a better option for SEO?

Kindly also suggest any other techniques you know

Janice

A: 

pop a redirect in your htaccess for the site.

Evernoob
+4  A: 

Search engines generally don’t interpret JavaScript. You should better do a proper HTTP redirect. And that can be done with either the mod_alias or mod_rewrite. Here’s a simple example that you can use in your .htaccess file:

# mod_alias
RedirectMatch 301 ^/page/(.*) /blog/$1

# mod_rewrite
RewriteEngine on
RewriteRule ^page/(.*) /blog/$1 [L,R=301]

That will redirect requests of the URL path that starts with /page/ to /blog/. So /page/foo/bar.html would be redirected to /blog/foo/bar.html. Also note the 301 for the proper permanent redirect status code.

Gumbo
+1. The 301 permanent redirect is the important bit that is needed. There are various ways to do it, but this is as good as any.
CJM
+1  A: 

Don't know if it might be easier, but Redirection is a WP plugin that handles 301s and logs them.

songdogtech