Ok, this is a little obscure and I’d appreciate any help.
I’m creating a blog in which some material is private and people need to login to get to. At present the blog is hosted at:
and on the General Settings page WordPress address (URL) == Site address (URL). Everything works fine. The blog works, what’s public is visible, what’s not is hidden until a user logins. Everything is as it should be.
Now the blog will be accessed via:
Now to make it work I have:
a) set up my hoster to point http://www.therealdomain.org to http://www.thehostingdomain.org/blogdirectory
b) changed the Site address (URL) to “http://www.therealdomain.org
c) updated the .htaccess file in http://www.thehostingdomain.org/blogdirectory according to what the permalinks says it should be.
Everything works fine too. When you’re browsing the blog, all links have http://www.therealdomain.org instead of http://www.thehostingdomain.org/blogdirectory so visitors don’t know about http://www.thehostingdomain.org.
The problem comes when you login to view the private content. I can login either at:
Either way after logging when I start browsing (i.e. browsing http://www.therealdomain.org) wordprss doesn’t seem to know I’ve logged in. I’ve tracked it down to the function is_user_logged_in — it thinks I’m not logged in.
The odd thing is that while I browse using http://www.therealdomain.org, all admin work is done via http://www.thehostingdomain.org/blogdirectory and the admin side knows I’m logged in and works fine.
Any suggestions on how to deal with this would be greatly appreciated as this is a big problem for me.
- The topic ‘is_user_logged_in fails if WordPress address (URL) not equal Site address (URL)’ is closed to new replies.