I am going crazy trying to figure out this menial but huge problem. I have read about it, I have tested it, but I can't figure out how to fix it.
I understand that, for whatever reason, there is a difference between "www.website.com" and "website.com" when it comes to sessions and cookies.
All I want to do, is have all sessions and cookies talk to both "versions" of the website...
I have tried manipulating my .htaccess file, I have tried messing with session_set_cookie_params, and I have had no luck whatsoever. Can someone PLEASE help me figure this out...
I had this for my .htaccess file, but its EXTREMELY SLOW because it redirects every page load... Is there a way to put if statements in here so that it only does the redirect if necessary?
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^website\.com$ [NC]
RewriteRule ^(.*)$ http://www.website.com/$1 [R=permanent,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule .* - [L]
RewriteRule ^(.*)$ /profile.php?u=$1 [NC,L]