Header and footer fail to load with SSL and custom links

Question

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.

Also:
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.

--------------------------------------------------

>>> Share a link to this question, just copy and paste the code bellow on your web page <<<

<a href="https://www.wptricks.com/question/header-and-footer-fail-to-load-with-ssl-and-custom-links/">

Header and footer fail to load with SSL and custom links</a>
0
, , , FrustratedWithFormsDesigner 5 months 0 Answers 45 views 0

Leave an answer