Redirect doesn't work for HTTPS
-
Hi,
I want my website to be available via HTTP without login and via HTTPS only after login (that’s where your plugin comes in).
Now after enabling it I got whitelisting for HTTP working with:
function my_forcelogin_whitelist( $whitelist ) { $scheme = parse_url(site_url(), PHP_URL_SCHEME); if( $scheme == 'http') { $whitelist[] = site_url($_SERVER['REQUEST_URI']); } return $whitelist; } add_filter('v_forcelogin_whitelist', 'my_forcelogin_whitelist', 10, 1);
but with this code or without it it gives me too long redirects errors for https. I either get an url that looks like something from this post, or 414 Request-URI Too Large from nginx or similar error from the browser.
WP_HOME and WP_SITEURL are set to https://url.
Please advise,
Marcin
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Redirect doesn't work for HTTPS’ is closed to new replies.