views:

19

answers:

2

Ok let me see if I can explain this easily

I have a forum that was hosted as my home page on www.mysite.com respectively. It's well indexed and I'd hate to lose any ranking.

Today I moved the entire root site from the root domain to www.mysite.com/forum to make way for our new CMS system which will now be the home page. (This is to help new users and easily guide visitors to our new store)

Currently I'm using this in my htaccess file

    RewriteEngine on

RewriteCond $1 !^Home
RewriteCond %{HTTP_HOST} ^mysite.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.mysite.com$
RewriteRule ^(.*)$ "http\:\/\/www\.mysite\.com\/forum\/$1" [R=301,L]

As you can see this takes care of redirects while still allowing me to access the cms located on /home

Here's the million dollar question:

Is there way to put the CMS onto the root domain while still redirecting all of the old forum links? I appreciate your help and hope I explained myself correctly :)

A: 

It would take quite a bit of work.

Your HTTP server won't know the difference between http://www.mysite.com/ (the old forum link) and http://www.mysite.com/ (the new CMS link).

However, and this is a big however, you can redirect all of the http://www.mysite.com/forum-link to http://www.mysite.com/forum/forum-link. You're probably going to have to write a RewriteRule for every unique forum-link you have.

One better possibility would be to put the new CMS pages at http://www.mysite.com/cms and redirect http://www.mysite.com there.

Gilbert Le Blanc
Well the CMS is currently located at http://www.mysite.com/Home I'd be more than happy to leave it there, but I'm thinking, if I redirect http://www.mysite.com/ to http://www.mysite.com/cms would that not kill off all the old forum links that where previously located on the root domain?
Chris
@Chris: I wasn't clear. If you put the CMS on a Home or cms directory, you can move the forum back to the root directory to preserve the links.
Gilbert Le Blanc
Ah I see what your saying. That would be easy enough but how would I make the CMS the new home page? (The point of the CMS is to make it a home page. It will contain links to our store and forum as well as general information about the product we sell)
Chris
@Chris: Redirect mysite.com to mysite.com/Home and put the forum main page on mysite.com/forum. You'd lose some of the links to the forum main page (because people will change their favorites), but keep the deep forum links.
Gilbert Le Blanc
A: 
  1. Set redirect to /forum/* for all requests except /*?no_redirect.
  2. Write 404 error handler for /forum directory. It should redirect user to /[requested_url]?no_redirect.
Riateche
I think I see what your saying, the only problem with this is that all the old forum links (example) http://www.mysite.com/ that are now located on http://www.mysite.com/forum would be lost. Boy do I wish I built the forum in the /forum directory to being with...
Chris