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 |
|
||||||
![]() ![]() ![]() ![]() ![]() 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?
|
||||||
|
|||||||
| Anonymous: LeChuck |
|
||||||
|
|
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 |
||||||
|
|||||||
| Dirk |
|
||||||
![]() ![]() ![]() ![]() ![]() 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 |
||||||
|
|||||||
| Anonymous: Ramsay E |
|
||||||
|
|
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? |
||||||
|
|||||||
| Euan |
|
||||||
![]() ![]() ![]() ![]() ![]() 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 |
||||||
|
|||||||
| machinari |
|
||||||
![]() ![]() ![]() ![]() ![]() 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 |
||||||
|
|||||||
| rgelbman |
|
||||||
![]() ![]() ![]() ![]() ![]() 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 |
||||||
|
|||||||
| Benta |
|
||||||
![]() ![]() ![]() ![]() ![]() 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.... |
||||||
|
|||||||
| Benta |
|
||||||
![]() ![]() ![]() ![]() ![]() 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! |
||||||
|
|||||||
| Content generated in: 1.40 seconds |
|
|
|