I currently own spoilertv.co.uk and have our gallery here
spoilertv.co.uk/images
I also own spoilertv.com and the sub-domain images.spoilertv.com
the current .co.uk gallery has over 120,000 images and 1000+ albumns.
Both .co.uk and .com are on the same physical server.
What I want to do is to move all the files/albumns over to the images.spoilertv.com address.
Now that part is fine and I know how to do that.
The problem I have, is that I have 1000's of articles on my website that link to images on the .co.uk domain
eg
http://spoilertv.co.uk/images/Scream Queens/Season 1/Cast Promotional Photos/sq_04-emma-green_0320_3__hires2.jpg.phpor
<div class="stvthumb">
<img src="http://www.spoilertv.co.uk/images/cache/Scream Queens/Season 1/Cast Promotional Photos/sq_04-emma-green_0320_3__hires2_100_cw100_ch100_thumb.jpg"></div>
Now if I move over to the .com gallery, all these link will break.
Is there anything I can do in terms of a redirect so that those links still work and redirect to their new .com address etc
Comments
Version 1.4.6 and beyond do not store absolute links in the database. Rather they store tokens that are re-generated to proper links of the current site.
So if you are running successfully on this release you simply backup your database on the old site and restore it on the new one. Be sure that you have moved all the albums and images BEFORE you restore the database. Otherwise the software may think that some have been removed and delete database entries for them.
So it would something like a permanent redirect?
Just in case, try all this with a mirror site if you have the space on your server to do so.
Yep, I plan to make a mirror of the files/albums on the new domain.
Then add a new redirect from the .co.uk to the .com and see if the old links/thumbnails redirect correctly to the new domain.
Then fingers crossed, remove the old domain files
Thanks for the help. Much appreciated.
Using your mysqladmin do an update on the news and pages tables replacing `http://www.spoilertv.co.uk/images` with `{*FULLWEBPATH*}` in the columns where you have these links (e.g. the content conlumn.) This will make the links portable like on the 1.4.6 release.
If you have instances where the `http://` is not present replace `www.spoilertv.co.uk/images` with `{*WEBPATH*}`. But do the FULLWEBPATH first!