Hi,
I am running Drupal 6.13 with pathfilter 6.x-1.0. Everything worked fine until I had to enable SSL on my page. Users can switch between both versions and I do not use redirects to enforce SSL on certain pages such as login and no SSL on content pages. I added
if ($_SERVER['HTTPS']) {
ini_set('session.cookie_secure', 1);
$base_url = 'https://www.example.com';
}
else
{
$base_url = 'http://www.example.com';
}
to my settings.php. I did not change the path filter standard (use absolute URLs). Performance caching and compression is off, all caches were cleared. My expectation was that pathfilter would adjust the base URL to use https when SSL is on in all absolute paths.
However, pathfilter creates the same link on the https and the http version, ie. every person surfing on the secure site gets all internal links displayed with http protocol. Switching to relative paths fixed the issue for now. But maybe this issue should be addressed so that pathfilter incorporates the correct protocol in the link creation.
Regards, Jens
Comments
Comment #1
mrfelton commentedPath filter is an input format, and the result of the filter is cached at time of creation. So, it is not possible for it to change based on wether the user is viewing an http or https page. This is a very similar issue to #516294: Can pathologic alter img src paths to be HTTPS if the page is served out HTTPS?. I'd suggest reading that for a detailed explanation.