Hi guys,
I've had boost running on my site for well over a year, without too many issues. Recently I noticed a bunch on missing images in pages,
(see an example here ... http://www.lightflows.co.uk/projects/web-design/wildlife-aid)
It seems that the cause of the missing imagse is that the image path is prefixed with HTTPS and not HTTP.
I don't run an SSL cert on this domain and never have - I have no clue why boost is adding HTTPS to the image path. When i'm logged in as admin and the cache is ignored, the images display fine as the path is just the usual HTTP.
An one experienced this?
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | boost_https-1066220_15.patch | 3.11 KB | frankcarey |
Comments
Comment #1
mikeytown2 commentedhttps://www.lightflows.co.uk/projects/web-design/wildlife-aid works (if you accept the self signed cert) thus it got cached. There is a setting to not cache https. Do a ctrl-f on the boost settings page to find it. You will need to flush your sites cache most likely.
Comment #2
hixster commentedThanks MikeyTown - seems like there some hosting weirdness going on, as we don't have an SSL cert. I'll disable the caching for HTTPS like you suggest though, many thanks.
Comment #3
hixster commentedHi Mikeytown, I have searched the config page and can't see any options for HTTPS? Would they be in another version of the module?
Comment #4
hixster commentedUpdate:
Can't see the setting in the config page, but can see some setting in the .htaccess generation page:
Should I change the
RewriteCond %{HTTPS} onto OFF?Comment #5
mikeytown2 commentedLeave this to on.
RewriteCond %{HTTPS} on
Looks like I got my self a bug. Need to not cache https
Comment #6
hixster commentedo.k. thanks for letting me know - any quick work arounds? my site is periodically broken?
Comment #7
mikeytown2 commentedStatically cache specific pages:
select "Cache pages for which the following PHP code returns TRUE (PHP-mode, experts only)."
Comment #8
hixster commentedNice one ,i'll give it a try.
Thanks
Comment #9
major_tom commentedNot working for me.
I added this to the config but Boost is still saving xml and html to the cache when files are first requested over https.
This badly breaks my site! We actually do have an ssl cert and we allow all pages to be requested over https or http.
Comment #10
hixster commentedYes - I should have confirmed that the suggested PHP did not fix the issue - my images still remained broken.
Sorry for the delay in updating - we've been super busy. I've disabled boost entirely for the moment until I have more time to look into the problem more deeply.
Comment #11
mikeytown2 commentedTry this
Comment #12
major_tom commentedyou know, the more I think about it, it seems like the https version should be considered a different, also-cacheable page.
for example, the regular front page could be cached in cache/normal/[domain]/_.html
and the secure front page could be cached in cache/normal/https_[domain]/_.html
and the module would do this by default (and offer an option for opting out of https cache altogether).
I may tackle this if I can get any sleep this week.
Comment #13
major_tom commented#11 confirmed to work
Comment #14
Iheartdrupal commentedHas this bug been fixed in dev version? Should I install that?
Thank you so much for making this software, it's really cool.
Comment #15
frankcarey commentedHere is a patch against 6.x-1.18 that adds an option to turn on and off caching HTTPS requests. FYI - It hasn't been fully tested yet.
Comment #16
syntheticMedia commentedWhat is the status on this? I am experiencing the same issues. Please advise, thanks!
Comment #17
syntheticMedia commentedHate to be a pain, but can anyone please let us know what the status is? this causes some pretty serious problems on our end with a highly trafficked site and i cannot rely on an untested patch. Please advise! Thanks!!
Comment #18
bgm commented@ everything27 : Testing the patch in #15 will help getting this committed/reviewed, but you can also use the solution in #11, i.e. to add the PHP snippet in your boost configuration ("cache if the php code returns true").
The patch in #15 seems good, but are the changes to the htaccess necessary?
Comment #19
William Aubert commentedHello,
I have the same problem on my site. Randomly, many images on views have a prefix https that prevents their display.
All images are available with http and I don't understand what causes the appearance of this https.
I have 6.x-1.21 version and I can't apply the #15 patch for 6.x-1.18 version.
I can't no more use the solution in #11 because I already use the "Cache every page except the listed pages" option on several url:
admin/*
uc_ajax_cart
uc_ajax_cart/*
cart
cart/*
checkout
checkout/*
Can someone help me?
Comment #20
Anonymous (not verified) commentedWhat is your .htaccess and is your site accessible by https ? As mentioned above, boost should disable.
Comment #21
William Aubert commentedThe site is not accessible by https.
My .htaccess is :
Comment #22
Anonymous (not verified) commentedHow odd. Can you turn off boost and visit those pages and see if the url's are constructed with https ? as boost should only save the output. Also do you you have a base_url set in settings.php (in an unrelated issue it was found that some sites needed this).
Comment #23
Anonymous (not verified) commentedare you talking about https://www.jouet-bois.com/jeu/nenufable because it is accessible by a self signed certificate.
Comment #24
William Aubert commentedThere is nothing special in my settings.php.
In fact, when I refreshed all caches (those boost included) or when I disabled boost, the images appear again with http.
The problem does not occur all the time. Looks like it occurs after changes have been made on nodes.
Comment #25
William Aubert commentedIt is www.france-natation.com but they are built and hosted in the same way
Comment #26
Anonymous (not verified) commentedI have looked at the other site (same self signed certificate).
What is was thinking was setting the base_url to only http may solve the problem, your pages can be requested via https which if boost is not disabling correctly would create a page with references to https images, you might be being spidered. I'd like to fix the bug but I'm more concerned with getting you running firstly.
The rewrite rules are working correctly, an https requested page is not being served as boost'ed which does suggest that it's the PHP of the module.
Comment #27
Anonymous (not verified) commentedA quick way around this would be adding this to .htaccess
which would also put your missing images back (I think). Probably needs to go at the top straight after RewriteEngine
Comment #28
William Aubert commentedThanks Philip,
Now, the https is disabled.
https://www.france-natation.com
Should I do something else in particular?
Comment #29
Anonymous (not verified) commentedI think it would be preferable to put the .htaccess code in because at the moment if the PHP decides to create a https link then you will have nothing display whereas with the rewrite then you will have images.
It's more of a, when we find the time to have a look at the drupal 6 code which is 'minimally maintained'.
Add the code.
Just clear the cache out.
Comment #30
William Aubert commentedThanks Philip,
sorry I would not make mistakes.
So I add :
RewriteCond %{HTTPS} on
RewriteRule ^.*$ http://www.france-natation.com
But should I remove the line : RewriteCond %{HTTPS} on [OR]
in my .htaccess ?
Comment #31
Anonymous (not verified) commentedJust leave the other line in. It is telling apache not to server cache pages over an SSL connection but is not the source of the problem and later on if we debug it, then you might need that line in there.
Put the rewrite code in, then visit the https version of the site and it should immediately redirect you. IF you are still getting missing images later on after the cache is cleared then we need to investigate at a higher priority. I suspect that your site is being crawled using https:// by a spider and generating boost pages with https:// links which are then being used for your normal site. That code is designed to get rid of that issue and if it continues then we have more information to work with, without the need to go through your server logs.
Comment #32
William Aubert commentedAhhhh. Ok, now I understand.
Thank you very much for these explanations.
I implemented the code and cleared cache.
I will tell you if the problem occurs again.
Comment #33
bgm commentedClosing issue, re-open if necessary.
Comment #35
giorgio79 commentedFollow up for 7x #1466480: Caches URLs as HTTPS leads to issues when accessing by HTTP