Member
Member
darkufo   2015-03-21, 00:06
#1

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%20Queens/Season%201/Cast%20Promotional%20Photos/sq_04-emma-green_0320_3__hires2.jpg.php

or

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

Member
Member
sbillard   2015-03-21, 00:57
#2

You did not mention the version of zenphoto you are running currently. That is a critical bit of the answer.

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.

Administrator
Administrator
acrylian   2015-03-21, 10:14
#3

If these url are really old absolute ones it should be possible to redirect the old domain links to the new via .htaccess. Another way might be to change all urls in the database directly via search & replace. In any case test all before setting the new site live naturally.

Member
Member
darkufo   2015-03-21, 10:34
#4

Yep, in the articles all the links are exactly like in my example.

So it would something like a permanent redirect?

Administrator
Administrator
acrylian   2015-03-21, 10:44
#5

Yes, unless you consider changing them that should be a permanent redirect. You might consider that for the site pages itself as well in case people linked to them in the past.

Just in case, try all this with a mirror site if you have the space on your server to do so.

Member
Member
darkufo   2015-03-21, 12:34
#6

Thanks Acrylian.

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.

Member
Member
sbillard   2015-03-21, 20:08
#7

You could also try a manual update of your database. Naturally you should try this on a test copy of the database first:

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!

Member
Member
sbillard   2015-03-21, 21:22
#8

That last example should not have included http://

Member
Member
darkufo   2015-03-21, 22:22
#9

Thanks SB

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.