Topics

User Functions

Events

There are no upcoming events

What's New

Stories

No new stories

Comments last 2 weeks

No new comments

Trackbacks last 2 weeks

No new trackback comments

Links last 2 weeks

No recent new links

NEW FILES last 14 days

No new files

Welcome to Geeklog Tuesday, May 21 2013 @ 08:30 PM EDT


 Forum Index > Support > General Geeklog Support New Topic Post Reply
 cookie issue with 2 domains
   
rgelbman
 08/12/04 10:19PM (Read 2254 times)  
+----
Newbie

Status: offline


Registered: 01/08/04
Posts: 7
I have a geeklog site (brucedvds.net) and we just added a second domain (brucedvds.com) that points to the same site. I have recieved emails from users who have received a message saying "The server's hostname does not match the domain attribute and the cookie has been rejected" when trying to access the site. I was wondering if anyone had any ideas on how I can fix this so users will not see that error message anymore?

 
Profile Email
 Quote
Anonymous: LeChuck
 08/13/04 02:30AM  



I have the same problem with a redirector...

I have a redirector at http://burradas.webhop.net that points to the real site addres http://burradas.almacenweb.com

If I set the redirecto to "mask" the real site address cookies doesn't work and people can't login to the site.

Please, throw a comment here if you find a solution for this issue

Thanks

 
 Quote
Dirk
 08/13/04 05:37AM  
AAAAA
Admin

Status: offline


Registered: 01/12/02
Posts: 13027
Quote by rgelbman: I have a geeklog site (brucedvds.net) and we just added a second domain (brucedvds.com) that points to the same site.

I'd suggest setting up a server-side redirect, so that users coming in through the .com site are automatically redirected to the .net site (or the other way around, if you prefer that).

Geeklog is really only built to be used with exactly one domain name.

bye, Dirk

 
Profile Email Website
 Quote
Anonymous: Ramsay E
 08/22/04 12:12PM  



I'm running into the exact same problem and there is absolutely, positively no way I can get anyone to change the server configuration.

I would happy to assist in any code changes (if any) that may be needed.

Is there a work around or hack available?

 
 Quote
Euan
 08/22/04 09:13PM  
+++++
Full Member

Status: offline


Registered: 04/22/02
Posts: 292
Two solutions

1) not perfect, but you could add some kind of check I guess to the top of index.php - something like (this is not real code)

if $_SERVER["SERVER_NAME"] = "brucedvds.com" || "www.brucedvds.com"
then refresh ( "brucedvds.net" )

else continue

You would have to put this BEFORE the include ( lib-common.php ) statement so that you didn't trigger the errors you are seeing. If someone entered on another page (eg an article) then this check wouldn't happen (unless you include it in every file).

2) the better solution would be to change provider of course.

Cheers,

Euan.

-- Heather Engineering -- No job too small
 
Profile Email Website
 Quote
machinari
 08/22/04 11:14PM  
+++++
Full Member

Status: offline


Registered: 03/22/04
Posts: 1512
try this server side option using an .htaccess file:
PHP Formatted Code

RewriteEngine on
RewriteCond %{HTTP_HOST} ^brucedvds.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.brucedvds.com$
RewriteRule ^(.*)$ http://brucedvds.net [R=301,L]


 

copy that code into your .htaccess file (assuming apache) and place it in your doc root at bruce.dvds.com.
It works for me, but you must have mod_rewrite loaded

 
Profile Email
 Quote
rgelbman
 08/22/04 11:17PM  
+----
Newbie

Status: offline


Registered: 01/08/04
Posts: 7
I already added the redirect to the htaccess file. I'm fine with the way everything is running now. I appreciate all the assistance.

Rob

 
Profile Email
 Quote
Benta
 04/06/05 04:32AM  
++++-
Regular Poster

Status: offline


Registered: 03/11/05
Posts: 80
Quote by rgelbman: I already added the redirect to the htaccess file. I'm fine with the way everything is running now. I appreciate all the assistance.

Rob


Hey Rob,

would you mind telling me how your redirect in the htaccess looks? I completely suck at htaccess stuff....

 
Profile Email
 Quote
Benta
 04/06/05 07:32PM  
++++-
Regular Poster

Status: offline


Registered: 03/11/05
Posts: 80
Quote by Benta:
Quote by rgelbman: I already added the redirect to the htaccess file. I'm fine with the way everything is running now. I appreciate all the assistance.

Rob


Hey Rob,

would you mind telling me how your redirect in the htaccess looks? I completely suck at htaccess stuff....



Never mind, please don't. I just changed the way I wrote it and no it works for me also...

Thanks everyone for the help, especially machinari!

 
Profile Email
 Quote
Content generated in: 1.40 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to post 
Filtered HTML Allowed 
Censored Content