The Slim Framework support forum has moved to This Tender forum is no longer maintained or monitored.

Resource name processing for browser cache (Beginner)

xxxcs's Avatar


08 Jun, 2013 11:14 AM

Hi slim framework users,

I am trying to bundle my cacheable resources to one file like


in which I load and include all files (in this case javascript).

This already works. My aim is to reduce the number of requests as far as possible.

This file automatically gets a version identification like: /js/all.js.1234.php
I submit this url to my template engine afterwards.
This works, too - in my document footer the URL will be placed into the script tag as src attribut value.

I then created a rewrite rule in my .htaccess file to cut off the version number when the file is requested but this is not working because the request is handled as 404 "notfound" problem by slim framework. Of course, in my understanding slim framework somehow sits on top of .htaccess and catches all unkown resources.

A rule like this
RewriteRule ^(.+)\.(js|css).([0-9]+)\.(php)$ $1.$2.$4
will not be processed.

What are my alternatives now? Is it possible to exclude slim from handling js and css resources? Is it possible to exclude directory paths?

Thank you very much in advance. Every help is appreciated! :-)

Best Regards

  1. Support Staff 1 Posted by Brian Nesbitt on 08 Jun, 2013 06:25 PM

    Brian Nesbitt's Avatar

    You should set this up so apache serves the file.

    I do this exact same thing (minus the version number) for my blog.

    ... oh and I use nginx instead.

    Your rewrite rule should allow the file to be found so apache serves it directly. It should never hit slim. The default apache rule for Slim is setup to serve anything it finds on disk and then redirect the request to slim if its not found.

  2. 2 Posted by xxxcs on 08 Jun, 2013 10:21 PM

    xxxcs's Avatar

    Thank you very much for the response.

    I installed the apache module modpagespeed in the meantime.

    It is doing the job for me as far as I see.

    Although I have no experience with nginx I will check your project soon. There should be much to learn for me. :)

  3. 3 Posted by riya on 05 Apr, 2016 01:27 PM

    riya's Avatar

    good photographs on your account, marking the items you utilized to produce your ideal appearance. windows program because, these software put some wonder to your photographs do nice.

  4. 4 Posted by aaks on 06 Apr, 2016 08:34 AM

    aaks's Avatar

    god VivaVideo APK is not totally blame to download Formally it was made for iOS and products that were android however not yet released for windows software great.

  5. 5 Posted by rima on 15 Apr, 2016 12:26 PM

    rima's Avatar

    good Cinemabox iphone app are the owners of some valuable features distinguishing Obtainable for Google android and iOS programs. nice.

  6. 6 Posted by opoo on 12 May, 2016 08:20 PM

    opoo's Avatar

    get the best here

  7. 7 Posted by John on 14 May, 2016 05:16 PM

    John's Avatar

    whatsapp download app is popular thing and to install and use in your computer from this guide is pretty easy and awesome.

  8. 8 Posted by Shane on 18 May, 2016 06:37 AM

    Shane's Avatar

    Yet another awesome article for resources.

  9. 9 Posted by Amita on 29 May, 2016 05:51 AM

    Amita's Avatar

    just enjoy your favorite messenger app whatsapp right on your desktop computer windows 8/10 and mac os

  10. 10 Posted by jamessandoeval on 04 Jun, 2016 12:02 PM

    jamessandoeval's Avatar

    good In buy to check out your entire photographs on the big display in your living area, Tidal HiFi music loading assistance costs $25.99 per month, great.

  11. 11 Posted by lala on 05 Jul, 2016 11:55 AM

    lala's Avatar
  12. 12 Posted by lala on 05 Jul, 2016 11:55 AM

    lala's Avatar
  13. 13 Posted by pulkit on 25 Jul, 2016 11:16 AM

    pulkit's Avatar

    good you can likewise make use of the software to discuss All you require to perform is usually adhere to these great.

  14. 14 Posted by balua on 26 Jul, 2016 12:55 PM

    balua's Avatar
  15. 15 Posted by ParthivShinde1 on 28 Jul, 2016 10:36 AM

    ParthivShinde1's Avatar
  16. 16 Posted by Swapnil Shinde on 06 Aug, 2016 01:46 PM

    Swapnil Shinde's Avatar

    Interesting Post...

  17. 17 Posted by Henri on 24 Aug, 2016 01:31 PM

    Henri's Avatar

    whatsapp download app is popular thing and to install and use in your computer from this guide is pretty easy and awesome.

  18. 18 Posted by Henri on 24 Aug, 2016 01:32 PM

    Henri's Avatar

    SHAREit is a free application that lets you send your content at lightning ...
    Transfer gigabytes of files from PC to PC in minutes, without cables

  19. 19 Posted by sulo on 24 Aug, 2016 01:34 PM

    sulo's Avatar

    showbox app download for android, show box legal app install on smartphone
    Showbox is an android based entertainment app that offers the android used free access to the largest collection of free movies and unlimited streaming for TV.

  20. 20 Posted by Mike on 24 Aug, 2016 01:36 PM

    Mike's Avatar

    PhenQ is a powerful new slimming formula combining multiple weight loss ...
    PhenQ contains ingredients that actually help stop the production of new fat,

  21. 21 Posted by zeduvodig0 on 29 Aug, 2016 07:25 AM

    zeduvodig0's Avatar

    Is there anyway I can delete browser cache without cookies and login data? Joint Pain Relief Codes reviews

  22. 22 Posted by Ali on 29 Aug, 2016 03:05 PM

    Ali's Avatar

    Phen 375 is a diet pills supplement

  23. 23 Posted by 1commdialie on 30 Aug, 2016 05:05 AM

    1commdialie's Avatar

    Thanks for showing this simple tutorial. I love it. The Big Diabetes Lie by Dr. Max

  24. 24 Posted by Anil on 16 Sep, 2016 01:26 PM

    Anil's Avatar
  25. 25 Posted by bc1ston3batch14 on 20 Sep, 2016 10:18 AM

    bc1ston3batch14's Avatar
  26. 26 Posted by qohokuho on 21 Sep, 2016 06:43 AM

    qohokuho's Avatar

    It is not possible for you to slow down the request of the customer.

  27. 27 Posted by Karan on 26 Sep, 2016 03:38 AM

    Karan's Avatar

    want to buy fitness gears for home gym then over you can check out the review of some of the best fitness product
     hope you would like it.

  28. 28 Posted by Karan on 26 Sep, 2016 03:40 AM

    Karan's Avatar

    check some fitness product review here

  29. 29 Posted by ruqipoze on 17 Oct, 2016 01:26 PM

    ruqipoze's Avatar
  30. 30 Posted by comegevu on 18 Oct, 2016 07:05 AM

    comegevu's Avatar

    Find the browser cache is good.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac