jenzed
Forum Replies Created
-
Whew – it took me a long time to figure this out.
The problem occurs when you have a different WordPress Address and Site Address in the WordPress settings. The cookie that gets placed to validate your session is in the wrong domain. It has nothing to do with which theme you are using, which plug-ins you’re running, or a messed-up site configuration.
The reason to use different WordPress Address and Site Address setting is because your domain points to a different location than the actual location of your website’s files – ie, your domain is a sub-domain of another domain. So, for example, say your website’s URL is “www.secondarydomain.com”, and it is installed under the “primarydomain” on your web server:
Wordpress Address: https://primarydomain/secondarydomain.com
You don’t want people to see or use this URL – you want them to use the …
Site Address: https://secondarydomain.com
Configuring your settings like that works fine EXCEPT when you want to preview changes when you are customizing a theme. For some reason the session can’t find your login validation cookie and therefore asks you to log in again (and again, and again, etc).
In order to fix this, you need to modify the .htaccess file on the web server for the subdomain.
- On the Permalinks setting page in WordPress click “Save”. This will ensure that the .htaccess file is created. (Permalinks are affected by the WordPress Address / Site Address settings because they are part of the URL component.)
- In many cases WordPress will not be able to write the necessary changes to the .htaccess file. This is for security reasons. At the bottom of the Permalinks page, WordPress will show you the text that needs to be added to your .htaccess file.
- Log in to your web server and make the following changes to the .htaccess file located in the root directory of the subdomain site:
RewriteEngine On RewriteCond %{HTTP_HOST} ^secondarydomain.primarydomain.com$ [OR] RewriteCond %{HTTP_HOST} ^www.secondarydomain.primarydomain.com$ [OR] RewriteCond %{HTTP_HOST} ^secondarydomain.com$ RewriteCond %{REQUEST_URI} ^/$ RewriteRule ^(.*)$ https://www.secondarydomain.com/ [R=301,L]
- If WordPress did not write your Permalink changes to the .htaccess file, copy the text from the bottom of the Permalinks setting page in WordPress and paste it into the .htaccess file.
- On the WordPress Settings | General page, ensure that both the WordPress Address and the Site Address are set to https://secondarydomain.com.
That should do it!
Forum: Plugins
In reply to: [Events] [Plugin: Events] How to link to pageYou can link to the same page from multiple events – you don’t need a separate page for each. For example, I display a short-list of events in the sidebar widget, but each one links back to my main “Events” page (which contains the full event description). https://www.hammondneighbours.ca/
Forum: Fixing WordPress
In reply to: Indenting Bulleted List Next to Left Align ImageHi Grant. I have the same problem. Could you tell me how you fixed it on your site? (By the way, those are some gorgeous stairs.)