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.
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:
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 the301
for the proper permanent redirect status code.Don’t know if it might be easier, but Redirection is a WP plugin that handles 301s and logs them.
pop a redirect in your htaccess for the site.