views:

158

answers:

1

Hi guys, my website has a log in by open id feature. When a user logs in for the first time using his/ her openid they are redirected to a create account page. I noticed just recently that one user when logged in using her google account created an account for the first time. However when she tried to log in again using the same google account - she was faced with creating a new account again. I checked the db and saw that although she used the same google account - the open ID urls which were retrieved are different?

EDIT===================

Thanks Kobi for the information - the issue is that I need to set up my website so it always opens with www prepended to it i.e. http://www.mysite.com and NOT http://mysite.com

Owing to this subtle difference google OpenID recognises the two urls as different urls!!! Help please

I realised its an htaccess thing however I googled a bit and found these htaccess commands:

RewriteCond %{HTTP_HOST} ^site.com [NC]
RewriteRule (.*) http://www.site.com/$1 [L,R=301]

However the problem is that when I use this in my htaccess it does forward and ensure the link reads as www.site.com however it messed up all the javascript links - actually I'm using url rewriting here as well... my whole htaccessfile is somewhat like this:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* index.php
RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php 
AddType text/css .css

inclusion of the two lines messes up the url rewriting :( what do I do here

======================

Uh never mind I figured it out :) I was putting the two rewrite url lines at the end thus somehow overriding the other rewrite rules - putting them in the beginning fixed it :) thanks anyway

+4  A: 

Google gives different URLs for different domains.
It is possible your user used a different URL each time to log in? Even www on the start of the url can change the code Google returns.

Kobi
Yow! I never though about that! Lemme check this here...
Ali
OMG! Man you were right about that - how do I fix it so its always www.mysite.com and not mysite.com :(
Ali
Well, I'm not sure how you can fix it. Many sites use only one URL (redirect) - this can also have SEO benefits, but I don't know how to fix your existing problem. Try to edit the question and add these details, or ask a new question.
Kobi
Ok, you've convicted me, you needed a new question. I'll know better next time...
Kobi