Hello, I am trying to figure out a way to forward all links from my photo gallery which is located here. http://www.razorbacklegacy.com/hog_archive/ to my new domain. Here. http://www.hogdb.com/razorback-photos/ I have moved it to another server and I'm trying to avoid broken links before I close the original gallery. links from the original gallery look like this. http://www.razorbacklegacy.com/hog_archive/index.php?cat=41 which is now http://www.hogdb.com/razorback-photos/index-41.html http://www.razorbacklegacy.com/hog_archive/thumbnails.php?album=272 now... http://www.hogdb.com/razorback-photos/thumbnails-272.html http://www.razorbacklegacy.com/hog_archive/displayimage.php?album=272&pos=0 is now http://www.hogdb.com/razorback-photos/displayimage-272-0.html Can anyone help me out with this? Thanks in advance.
Sorry... Couldn't edit the original post. I have setup mod rewrites on the new server to give me better SEO on the links, but I can't find a way to auto forward everything from the old site to the new domain. Can anyone help me out with this?
thats what I'm wanting to do. Just wondering if it's possible (since the links are dynamic) if there is a way to do all of them with a few lines instead of probably 10,000 that it would take if I went link by link.
I meant a 301 redirect, sorry there. Anyway, this should do the trick, if I understood you correctly. Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L] Code (markup):
that works pretty well. However it sends to the dynamic url like the original domain uses instead of the rewritted url I'm doing on the new domain.
Hmm.. The code posted above should be used on the old server. And the new server will have to take care of allowing both old-style urls(?id=xxx) and the new one style urls(/id/xxx/). Or am I missing something here?