Home Community Mys-Script Creative Off-Topic |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
User login dependant on if there's a "www." in the url
I've noticed that if you're logged in (on my site and other adoptable sites using this script) that if you log in on "www.site.com/etc" and then switch over to just "site.com/etc" they are logged out. Is there any way around this? Such as automatic redirection to "www.site" or something else?
Thanks in advance. ;) |
#2
|
||||
|
||||
RE: User login dependant on if there's a "www." in the url
This is because the cookies are set this way.
Perhaps on when it sets the cookies, have it set it both ways? Some people like www, some don't, so you can't win by redirection, I think... :P |
#3
|
|||
|
|||
RE: User login dependant on if there's a "www." in the url
That's odd. The cookies should work for both versions. I'll look into it.
|
#4
|
|||
|
|||
RE: User login dependant on if there's a "www." in the url
put this in your .htaccess to redirect all non www to www
Code:
Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^yoursite.com [NC] RewriteRule ^(.*)$ http://www.yoursite.com/$1 [L,R=301] |
#5
|
|||
|
|||
RE: User login dependant on if there's a "www." in the url
Hmm doesnt seam to work. :\
I don't need to enable htaccess anywhere, do I? |
#6
|
|||
|
|||
RE: User login dependant on if there's a "www." in the url
have you change the yoursite.com to your domain?
If it still doesn't work, try to put this code in your .htaccess instead Code:
RewriteEngine On RewriteCond %{HTTP_HOST} ^yourdomain\.com$ RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L] |
#7
|
|||
|
|||
RE: User login dependant on if there's a "www." in the url
This is what my .htaccess looks like with your code:
Code:
RewriteEngine On RewriteCond %{HTTP_HOST} arvyre\.com$ RewriteRule (.*) http://www.arvyre.com/$1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^get/([0-9]+).gif$ /adoptables200/siggy.php?id=$1 [L] |
#8
|
|||
|
|||
RE: User login dependant on if there's a "www." in the url
You forgot to put a "^" before arvyre\.com$ on line 3
Code:
RewriteEngine On RewriteCond %{HTTP_HOST} ^arvyre\.com$ RewriteRule (.*) http://www.arvyre.com/$1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^get/([0-9]+).gif$ /adoptables200/siggy.php?id=$1 [L] |
#9
|
|||
|
|||
RE: User login dependant on if there's a "www." in the url
Quote:
The .htaccess still doesn't seem to work. :S Any other ideas? |
#10
|
|||
|
|||
RE: User login dependant on if there's a "www." in the url
hmm...this should be a lot easier if you configure it throught cPanel...don't you have cPanel access to your website?
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can't do first login | Mortain | Questions and Supports | 17 | 11-13-2015 07:56 PM |
Login Box | Hedgen | Questions and Supports | 1 | 11-05-2012 12:13 PM |
Login Failed | rosepose | Questions and Supports | 5 | 05-27-2009 07:32 PM |
Login Failed | Hiddenzbu | Questions and Supports | 2 | 05-23-2009 12:52 PM |
login fix | 12345 | Questions and Supports | 0 | 03-13-2009 02:03 PM |
What's New? |
What's Hot? |
What's Popular? |