Welcome to Geeklog, Anonymous Saturday, May 11 2024 @ 08:16 am EDT

Geeklog Forums

cookie issue with 2 domains


Status: offline

rgelbman

Forum User
Newbie
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?
 Quote

LeChuck

Anonymous
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

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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
 Quote

Ramsay E

Anonymous
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

Status: offline

Euan

Forum User
Full Member
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
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
try this server side option using an .htaccess file:
Text 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
 Quote

Status: offline

rgelbman

Forum User
Newbie
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
 Quote

Status: offline

Benta

Forum User
Regular Poster
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....
 Quote

Status: offline

Benta

Forum User
Regular Poster
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!
 Quote

All times are EDT. The time is now 08:16 am.

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