It seems like I'm not the only one with this problem but none of the other issues presented a clear solution.

I have a url variable called "?slide=X" which is only controlling which slide opens on the javascript slideshow when the page loads. Obviously I don't need 10 different Boost caches for each of the slides since they're all loading the same html.

All the .htaccess rules above don't really do it for me. Anybody had any luck on this?

examples.com/node/10?slide=3 needs to call the cache/normal/examplecom/node/10_.html file instead the cache/normal/examplecom/node/10_slide=3.html

Is this at all possible?

It would be great to have a general option on the settings page to ignore all url parameters or maybe ignore specific ones but still cache the pages. I think boos for D6 had this.

Thanks in advance

3 Answers 3


i just saw you in this issue :D

have you tried:

2 options to solve this. Create a rewrite rule at the server level to strip userID=1234 or in setting.php strip it out & use hook_boot to add it back in.

A more interesting solution proposed in this thread by mikeytown (maintainer of several high performance Drupal modules like Boost and Advagg), is to remove specific query parameter at the server level or in settings.php, thereby tricking Drupal into getting and setting the page cache using a cleaner URL string. This will almost certainly have unintended consequences, however, and should be implemented with extreme caution.

Found here: http://www.asmallwebfirm.net/blogs/2012/07/page-cache-vs-landing-page-performance

  • adding a rewrite rule on the .htaccess seems like the right way to do it but I just don't know how to do it.
    – Pedro
    Commented Nov 4, 2015 at 0:21
  • have you tried the -s option from the drupal issue ?, like RewriteCond %{REQUEST_FILENAME} -s
    – rémy
    Commented Nov 4, 2015 at 6:56
  • otherwise try to do it in settings.php, see the example here: drupal.stackexchange.com/questions/102571/…
    – rémy
    Commented Nov 4, 2015 at 6:56

As per Caching pages with boost based on a cookie value resolved this by adding this to the end of my setting.php page:

//check if url has parameters
if(strpos($_SERVER['REQUEST_URI'],'?') == true) {
    //clean all parameters   
    $_SERVER['REQUEST_URI'] = strtok($_SERVER['REQUEST_URI'], '?');

Adding more php logic to ignore specific parameters should not be hard but since my website uses only one I choose to remove it all.


What if the parameter is required for rendering the page, but not for caching? What about removing it from the cache key?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.