Open Jimmi08 opened 7 months ago
if you set redirection on, it doesn't work for siteurl with www prefix
Steps to reproduce the behavior:
Site redirection to www version. It works with https and htttp.
The reason is here: if (($urlport !== $PrefSitePort || stripos($PrefSiteBase, $urlbase) === false ) && strpos(e_REQUEST_SELF, ADMINDIR) === false)
if (($urlport !== $PrefSitePort || stripos($PrefSiteBase, $urlbase) === false ) && strpos(e_REQUEST_SELF, ADMINDIR) === false)
In my case: $PrefSiteBase - www.hpfanfiction.cz $urlbase -hpfanfiction.cz stripos($PrefSiteBase, $urlbase) = 4 - so that check fails
Thanks
A possible solution, not tested, just note
list($PrefSiteBase,$PrefSitePort) = explode(':',$PrefRoot.':'); $PrefSiteBase = str_replace("www.", '', $PrefSiteBase);
Bug Description
if you set redirection on, it doesn't work for siteurl with www prefix
How to Reproduce
Steps to reproduce the behavior:
Expected Behavior
Site redirection to www version. It works with https and htttp.
Additional Information
The reason is here:
if (($urlport !== $PrefSitePort || stripos($PrefSiteBase, $urlbase) === false ) && strpos(e_REQUEST_SELF, ADMINDIR) === false)
In my case: $PrefSiteBase - www.hpfanfiction.cz $urlbase -hpfanfiction.cz stripos($PrefSiteBase, $urlbase) = 4 - so that check fails
Thanks