forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 bridging => Topic started by: mrandall131 on January 16, 2006, 05:29:42 am

Title: Change Coppermine's Cookie Domain?
Post by: mrandall131 on January 16, 2006, 05:29:42 am
Ok, the bridge between coppermine and SMF works great.  Now, the problem I have is that SMF provides a "utility" that allows information from the board to be used on site pages.  Problem is, I can't really use it as the cookie domains differ.  Not many people will leave the www. off when visiting my site.

So, is there anyway to change the cookie domain of coppermine to add the "www." in front of the domain?
Title: Re: Change Coppermine's Cookie Domain?
Post by: Joachim Müller on January 16, 2006, 07:40:06 am
force the www or force the lack of it by adding a bit .htaccess magic like this
Code: [Select]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.your_site\.tld$ [NC]
RewriteRule ^(.*) http://your_site.tld/$1 [R,L]
Title: Re: Change Coppermine's Cookie Domain?
Post by: mrandall131 on January 16, 2006, 03:28:35 pm
You mean that does it for the whole site?  index.html too?
Title: Re: Change Coppermine's Cookie Domain?
Post by: Tranz on January 16, 2006, 06:24:57 pm
Yes
Title: Re: Change Coppermine's Cookie Domain?
Post by: mrandall131 on January 16, 2006, 06:33:19 pm
Thanks guys, really appreciate it!!
Title: Re: Change Coppermine's Cookie Domain?
Post by: mrandall131 on January 16, 2006, 06:41:55 pm
Ok, here's what I added to the .htaccess file.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.northeastatvers\.tld$ [NC]
RewriteRule ^(.*) http://northeastatvers.tld/$1 [R,L]

Is this correct?  When I added that and typed in www.northeastatvers.com, it did not change it to northeastatvers.com.
Title: Re: Change Coppermine's Cookie Domain?
Post by: Tranz on January 16, 2006, 07:00:23 pm
Does your host allow rewrite in .htaccess?
Title: Re: Change Coppermine's Cookie Domain?
Post by: mrandall131 on January 16, 2006, 07:32:20 pm
Thanks, opened a ticket with them.
Title: Re: Change Coppermine's Cookie Domain?
Post by: Joachim Müller on January 16, 2006, 08:37:29 pm
Ok, here's what I added to the .htaccess file.

Code: [Select]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.northeastatvers\.tld$ [NC]
RewriteRule ^(.*) http://northeastatvers.tld/$1 [R,L]

Is this correct?  When I added that and typed in www.northeastatvers.com, it did not change it to northeastatvers.com.
Make it
Code: [Select]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.northeastatvers\.com$ [NC]
RewriteRule ^(.*) http://northeastatvers.com/$1 [R,L]
instead and you should be fine - the abbreviation "tld" is short for "top level domain", I was trying to suggest that you change it as well, as I didn't know your domain name when I posted the example.
Title: Re: Change Coppermine's Cookie Domain?
Post by: mrandall131 on January 17, 2006, 03:16:28 am
Thanks to everyone.  You guys make it so easy for noobs like me to get this stuff working.