I had content on my domain (www.mydomain.com) and I'm now simply going to have a forum (www.mydomain.com/forum). What's the best way to redirect? Through cpanel--or with an htaccess file? And if I use htaccess, what should be in it?
Thanks.
This is a discussion on Best way to redirect within the General Discussion forums, part of the vBSEO SEO Plugin category; I had content on my domain ( www.mydomain.com ) and I'm now simply going to have a forum ( www.mydomain.com/forum ...
I had content on my domain (www.mydomain.com) and I'm now simply going to have a forum (www.mydomain.com/forum). What's the best way to redirect? Through cpanel--or with an htaccess file? And if I use htaccess, what should be in it?
Thanks.
Are you moving pages from the root to the forum directory, or are you just getting rid of the root page?
The Forum Hosting - Forum Hosting from the Forum Experts
Place this in root .htaccess
Any request to yourdomain.com or yourdomain.com/page.php will be sent to yourdomain.com/forum/ or yourdomain.com/forum/page.phpCode:RewriteEngine On RewriteRule (.*) http://www.yourdomain.com/forum/$1 [R=301,L]
for example.
Brian Cummiskey / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
But the point remains, why put something into a folder if you have nothing in root?
moving the forum to root is usually the 'better' thing to do.
Brian Cummiskey / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
it's pretty easy.
Moving to forum root - vBulletin SEO Forums
Instead of step 2, change your vboptions -> site url setting to the new location, and also make sure your htaccess for non-www to www redirect path is also correct. That's all you need to do.
Brian Cummiskey / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
If you have ssh access, that is the better way. you can simple do a mv command and it will only take a few seconds instead of hours to ftp down and up again (if you have a lot of attachments, etc)
SSH commands
Yes, change the vboptions setting first, or you might not be able to get into the admin panel again (always a good idea to leave that window/tab open while you move)
The database won't move. it's still 'localhost' or whatever its set to now. that isn't changing.
Brian Cummiskey / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
Related question. What's involved in doing away with the "www" in the URL? Is it just a matter of removing it in admincp? Or are there other settings that have to be changed on the server?
Copying is usually best, that way if you mess up the source is still there. You can delete it later.
should do the trick, obviously replacing it with your actual path and folder names.Code:cp -r /home/sitepath/public/forums /home/sitepath/public
Getting rid of the www is the same concept-- set the vboptions -> site url and homepage values without it, and make sure the htaccess is set without www's as well.
[How to] Setup www.yourdomain.com or yourdomain.com (www vs. non-www) - With .htaccess 301 redirects - vBulletin SEO Forums
Brian Cummiskey / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!