forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: BradInOKC on November 04, 2010, 04:09:11 pm

Title: Redirecting a category thumbnail and title to an external site
Post by: BradInOKC on November 04, 2010, 04:09:11 pm
My gallery is at http://www.builderbobs.com/gallery/floortoceiling/index.php (http://www.builderbobs.com/gallery/floortoceiling/index.php)

I am trying to change the place people go to when they click on the category "Coaster Fine Furniture".  I would prefer it redirect them to www.coasterfurniture.com instead of taking them further into my gallery.  Is there a way to do that?  Or can you tell me what file I would need to edit to change the url attached to the link and the thumbnail?  Thank you for your help.

Brad
Title: Re: Redirecting a category thumbnail and title to an external site
Post by: Αndré on November 05, 2010, 03:49:22 pm
You're running cpg1.5.6, but the latest release is cpg1.5.8.

Regarding your question: I'd create a redirection via htaccess, so you don't have to edit something in Coppermine.
Title: Re: Redirecting a category thumbnail and title to an external site
Post by: BradInOKC on November 06, 2010, 09:37:04 pm
I don't think I have access to use .htaccess files...I'll have to check with my web host...  Thanks for the heads up on the version change, didn't know there was an update.
Title: Re: Redirecting a category thumbnail and title to an external site
Post by: BradInOKC on November 08, 2010, 07:42:20 pm
Andre or anyone:  Can you please tell me where to put the .htaccess file in order to redirect a link on my main index page to an external site?  The contents of my .htaccess file are:

Quote
Redirect builderbobs.com/gallery/floortoceiling/index.php?cat=42 http://www.coasterfurniture.com

Is that right?  I know this borders on not being coppermine related...but since you suggested it I am hoping you might have some insight for me.  Thank you for any help anyone might offer.
Title: Re: Redirecting a category thumbnail and title to an external site
Post by: Αndré on November 08, 2010, 07:52:10 pm
Put it in the Coppermine directory or any directory above. Change
Code: [Select]
Redirect builderbobs.com/gallery/floortoceiling/index.php?cat=42 http://www.coasterfurniture.comto
Code: [Select]
Redirect /gallery/floortoceiling/index.php?cat=42 http://www.coasterfurniture.com(not tested).
Title: Re: Redirecting a category thumbnail and title to an external site
Post by: BradInOKC on November 08, 2010, 08:15:52 pm
Just won't work...I dunno what it could be.  I've tried moving it to different directories, etc..  thank you for your help though.

Can you tell me which coppermine file I would need to edit to recode it to go to that external url isntead?  Would it be my mysql database i'd have to edit?
Title: Re: Redirecting a category thumbnail and title to an external site
Post by: BradInOKC on November 08, 2010, 10:27:28 pm
I think it has to do with the
Quote
?cat=42
at the end of the index.php extension...maybe it won't redirect that way?
Title: Re: Redirecting a category thumbnail and title to an external site
Post by: Αndré on November 08, 2010, 10:48:21 pm
I'm currently not sure. Will perform some tests tomorrow.
Title: Re: Redirecting a category thumbnail and title to an external site
Post by: BradInOKC on November 08, 2010, 10:58:56 pm
Seriously, thank you very much. 
Title: Re: Redirecting a category thumbnail and title to an external site
Post by: Αndré on November 09, 2010, 10:14:17 am
If you have mod_rewrite enabled, create a .htaccess file with the following content in your Coppermine directory:
Code: [Select]
RewriteEngine On
RewriteCond %{QUERY_STRING} ^cat=42$
RewriteRule ^index\.php$ http://www.coasterfurniture.com?
Title: Re: Redirecting a category thumbnail and title to an external site
Post by: BradInOKC on November 09, 2010, 03:07:37 pm
Thank you!!  That worked!