Header and footer fail to load with SSL and custom links


I have an existing site that I am now trying to secure, but I’m running into problems with the header and footer on the pages that are accessed via custom links in the menu. When I try to access a custom link (such as http://mywebsite.com/SomeNonWordPressComponent), the content loads, but the header and footer render as:

Moved Permanently

The document has moved here (https://localhost/common/header.php).

The header and footer on regular WordPress pages render perfectly fine.

What do I have to change so that the header and footer will render correctly for custom pages?

Things I’ve tried so far:

  • set WP_HOME and WP_SITEURL to begin with https.
  • click the “Save Changes” button on the Permalinks page.
  • manually add to my WordPress root directory’s .htaccess this extra rewrite rule:
     RewriteCond     %{HTTPS} off
     RewriteRule     (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Still getting the redirect (as above) for the header and footer.

the path common/header.php actually exists up one level from the wordpress root directory. Tried a symlink in wordpress to /path/to/webroot/common bt that does not seem to work, either.

, , , FrustratedWithFormsDesigner 2 years 2020-01-12T08:42:26-05:00 0 Answers 123 views 0

Leave an answer