Forum
use perch_page_url in template force https://
Hi,
I use this code to get the right link for a menu. The problem is that a get http and not https so i get a 301 error. Is there a way to force https?
I set define('PERCH_SSL', true); then i get a ERR_TOO_MANY_REDIRECTS error
<?php
PerchSystem::set_var('var_url', perch_page_url([], true));
perch_content_custom('Facts_land', [
'template'=>'facts_land.html'
]);
?>
Hello
Add this to your htaccess
Thx,
That is not the problem. I al ready done that. The problem is that de link from the template is not https:// When i click on the url .htacces change it to https:// The problem is that it give a 301 error. I want a https:// url for the menu at https://www.reisbijbel.nl/marokko See klimaat.
I hope you understand me.
master page code
Template code
I don't recommend using the
PERCH_SSL
stuff any more. It was designed for a time when people had mixedhttp
andhttps
environments. These days everything should behttps
.Thx Drew, I use https:// for the site. The problem is that when i use
I get a https:// url back in place of a https://
Where can i change that?
It's using the value of the
HTTPS
header on the request to determine if the URL should behttp
orhttps
.In PHP terms, it's checking
$_SERVER['HTTPS']