animalmutch
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Sessions not working – Tried everything!Hi,
Put this in your .htaccess to rewrite all urls to the www. version:
<IfModule mod_rewrite.c> Options +FollowSymLinks Options +Indexes RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^yourdomain\.com$ RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,L] </IfModule>Forum: Fixing WordPress
In reply to: Sessions not working – Tried everything!Well, just in case it’s useful to anybody I’ll let you know how I fixed it in the end:
The whole problem was down to the canonical domain set in the wordpress settings. I set a canonical domain via .htaccess and set the same canonical domain in wordpress et voila!
Now I can happily use sessions just by starting the session in the normal way at the top of my theme template pages.
This was also causing a ‘same-domain policy’ issue when trying to use ajax, but the canonical domain fixed this too.
Can’t believe it’s taken me this long to work this out! I’m officially retarded.
Forum: Fixing WordPress
In reply to: Sessions not working – Tried everything!I am now getting a session, but when I move between wordpress pages and pages in my static site, the session does not persist, and a new session is set up. When I go back to wordpress pages the previous session is still active on these pages! Any ideas?
Forum: Fixing WordPress
In reply to: Sessions not working – Tried everything!PS – The weird thing is that this works perfectly on my local server. It’s only on the live version that sessions suddenly stop working, so it seems that there could be a server configuration issue, perhaps?