PDA

View Full Version : URL will change, can I prevent broken links?


JayEss
02-20-2009, 12:27 PM
Hi all, I'll be moving my vb database to another server this weekend, and also onto a new domain name. Is there any way I can update the database so that all links referencing current domain name can be replaced with the new one? Cheers.

SEOvB
02-20-2009, 01:41 PM
There are a few spots you'll need to change via the vBulletin Options -> Settings

You can use the replacement variable manager to handle changing http://domain1.com into http://domain2.com

Don't forget to get a htaccess for 301 redirects

JayEss
02-20-2009, 02:02 PM
Ok, thanks for that. Do I change these options before I move my database or does it not make any difference?


Don't forget to get a htaccess for 301 redirects

Sorry, can you elaborate on the above for me?

Dismounted
02-21-2009, 04:00 AM
RewriteCond %{HTTP_HOST} ^olddomain\.com$ [NC]
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]

JayEss
02-21-2009, 11:33 AM
Thank you!

I also discovered this bit of info in the "moving servers" documentation for vb.

Warning:
Specific cookie domains (Cookie Domain) and cookie paths (Path to Save Cookies) may cause problems if you are moving servers and changing the URL to your forums.

If you are unsure whether your cookie settings will cause problems after the move, we recommend resetting your cookie path to / and removing any cookie domain value before the move. An incorrectly set cookie domain or path will likely prevent you from accessing your control panel.

Do I need to take this into account, too? If I need to do this, can someone tell me how on earth I reset the cookie path?

--------------- Added 1235224176 at 1235224176 ---------------

Ok, I found where in vb options it can be reset, but I guess I would like to know whether I need to do this before the move or not?

--------------- Added 1235224555 at 1235224555 ---------------

Blah, just ignore me. I don't have any custom settings in the cookie path options and so this doesn't apply. Lol.

Dismounted
02-21-2009, 11:56 AM
Do it before the move, otherwise you will not be able to login after the move.