You are not logged in.
Pages: 1
Is there a way to check if I'm logged into the admin site on the main site (the entire main site)? I was able to check if an admin cookie is set ($_COOKIE["bigtree_admin"]["email"]) but it only works on the home page for some reason; I could very well be doing something wrong... I'm trying to add functionality on the main site that you can only do if you are logged into the admin site. Hopefully that makes sense!
Thanks!
Offline
It's possible that the "domain" in your environment.php file is set incorrectly. That will cause your login cookie to be scoped improperly and not available on all pages of your site.
Offline
It appears as though when I login through the admin and view the site it wipes out the www from the URL. Then the cookie appears true. I tried updating my config.environment.php to include the www in the domian, www_root, and admin_root but it still wipes it from the URL every time I login to the admin.
If I go to the admin URL using www, it removes it. Then I can add it too the URL and it stays and I can login but upon being directed to the dashboard, it removes the www again from the URL. If I try to then add it in the URL on the dashboard link, it redirects me back to the login screen without the www in the URL. Hopefully that makes sense...
I would really like everything to have a leading www in the url if possible.
Thank you!
Offline
It sounds like it's possible that you have an .htaccess rule that is stripping the www from your hostname when accessing the site with www. in the domain.
Offline
Upon digging into my .htaccess file. I can't find anything that would strip the www from the admin site.
This is at /site:
IndexIgnore */*
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?bigtree_htaccess_url=$1 [QSA,L]
RewriteRule .* - [E=HTTP_IF_MODIFIED_SINCE:%{HTTP:If-Modified-Since}]
RewriteRule .* - [E=HTTP_BIGTREE_PARTIAL:%{HTTP:BigTree-Partial}]
It's only the admin site where this occurs. The main site keeps the www just fine. Also I should note, the cookie noted above DOES NOT register as set on the home page when the www is present, so you are correct in that it is the domain name (mainly the absence of the www).
Offline
Shoot....I was editing the wrong environment file. Everything appears to be working now Thank you for your help!
Offline
Glad you got everything worked out!
Offline
Pages: 1