Here's a problem I just found: URLs on my website all end in .html. This is translated into _html in the filename, and Apache apparently doesn't find that file. So now only the frontpage and a few special pages are actually retrieved from the cache.
Why does the period even have to be translated for the filename? A file something.html.html is no problem and would solve this issue.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | boost-180689.patch | 437 bytes | Hetta |
Comments
Comment #1
Hetta commentedSame for me: boost works fine for taxonomy terms, but content called up with *.html doesn't show the
<!-- Page cached by Boost at 2007-10-04 08:46:40, expires at 2007-10-05 08:46:40 -->in the html source.All pages are cached on the hard drive.
That's using the latest dev version, downloaded today.
(Sorry, I couldn't find the place where "." is preg_replaced to "_" in the code.)
Comment #2
Hetta commentedI've read and re-read the boost code, and I really can't see where the "*.html" (of the url_alias) is changed to "_html", before boost adds ".html" and writes things to the hard drive.
I'd love to see where that's done, though. Help?
Thanks!
Comment #3
eagereyes commentedGot it! This line in boost.api.inc:
$path = preg_replace('@[^/a-z0-9_-]@i', '_', $path);needs to get the period added to the list of exceptions:
$path = preg_replace('@[^./a-z0-9_-]@i', '_', $path);Works wonderfully now!
Can somebody make this into a patch to get it included into the module?
Comment #4
Hetta commentedThanks! Here's the patch, against .dev.
Comment #5
vivekkhera commentedDon't you need to escape the "." as "\." to prevent it from matching all characters? You've effectively neutered the regexp so it doesn't replace anything, except perhaps newlines, haven't you?
Comment #6
oliver soell commentednot in this case: inside character classes, . is considered a literal.
-o
Comment #7
Arto commentedLooking into this.
Comment #8
federico commentedPatched against dev ant still doesn't work for me.
I think this issue should be mentioned in readme.txt because it can actually "unboost" your site if you use a lot of aliases ending with "html". Every request for a page with alias ending in "html" writes a watchdog error
symlink() [<a href='function.symlink'>function.symlink</a>]: File exists en la línea 83 del archivo /var/www/site/sites/all/modules/boost/boost.helpers.inc.", and in my case this causes a higher response time and server load than without boost.Comment #9
andreiashu commentedFor me this solution at #4 worked just fine in 6.x version.
@federico: those watchdog messages appear only with the mentioned patch ? Try to clear the cache after applying it. I don't have any idea for your problem, for me the patch works flawlessly.
Comment #10
federico commentedOK, I installed everything again and applied patch again and it works fine!!! Thanks! Maybe last time i applied the path in a wrong way.
Comment #11
memtkmcc commentedresolved
Comment #12
mikeytown2 commentedClosing all 5.x issues; will only reevaluate if someone steps up #454652: Looking for a co-maintainer - 5.x
Reason is 6.x has 10x as many users as 5.x; also last 5.x dev was over a year ago. The 5.x issue queue needs to go.