Welcome to WebmasterWorld Guest from 22.214.171.124
I'm a newbie, so excuse my elementary question.
I have a discussion board located in a domain.com/x directory for over a year now
Now I need to move my board to a sub.domain.com.
Problem is, my board is heavily indexed in google (over 30,000 entries) and most users come from ggogle. So I need to be careful not to loose such traffic once the URLs change.
Is there a way to automatically redirect visitors who click on an old x/... dynamic link to the new sub link? I'm not talking about the index page, I mean each individual dynamic URLs of forum or topic etc.
I use cPanel, which has a redirection tool, creating an .htaccess file for the purpose. But that, I noticed, only redirects all old links to the new index page, not the equivalent pages of forums and topics.
Can someone help me in this please?, I dont know nothing about htaccess files, so it would be great if someone writes me one here for the prupose.
I need to know how before I go ahead and move that directory...
and, becides htaccess file, is there any other steps or files that I should do for the sake of keeping my indexing privilages in google? (I read here about a 301? what is it? and is that useful in my case too?)
I apologize for asking too much...
Many thanks in advance
Welcome to WebmasterWorld [webmasterworld.com]!
> it would be great if someone writes me one here
In accordance with our charter [webmasterworld.com], we would be happy to help you learn to do this yourself. It is the usual case that no code posted here will be quite perfect for your needs. Therefore, learning to do it yourself will be a great help to you while you get it working on your site - and exactly the way you want it to work.
Have a read through this Introduction to mod_rewrite [webmasterworld.com] post, and follow the links to the Apache documentation and the regular expressions tutorial if you are not already familiar with them. Then perhaps you can experiment a little and then post your code along with a detailed description of the URLs you are trying to rewrite and the results of your testing.
The key to redirecting all old pages to their new corresponding pages is to use a "back-reference" which you will find described in the mod_rewrite documentation. You can easily set up a rewrite to map all of your old URLs to your new ones and, using a 301 external redirect, cause the search engines to update their listings of your URLs. While your PageRank in Google will end up being re-assigned to your new URLs eventually, you can help this process along by getting as many of your incoming links updated to the new URLs as possible. This helps make the transition faster; the more you can get updated, the faster it will go. But naturally, there are always a few sites that never update their links, and leaving the 301 redirects in place will help the search engines to handle that properly.