Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

mod_expires and far-future expiration

  • 20-11-2010 1:40pm
    #1
    Registered Users, Registered Users 2 Posts: 648 ✭✭✭


    hi there,

    im using mod_expires on apache 2 and im trying to add far-future expiration date to a js and css file but im having trouble

    (mod_expires and headers is working as it works for images)

    the link to the js file is for example :

    min/g=jsmain&t=idrive&debug=1

    thing is it does not have .js becuase im using a php minify script to include all my js files and minify them.
    so basicallt there is a htaccess in min with the following :
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ^([a-z]=.*)  index.php?$1  [L,NE]
    </IfModule>
    

    i tried this also :
    min/g=jsmain&t=idrive&debug=1&contentType=1290177889-expires.js
    (ie adding a .js at the end to see would apache recognise it as a js file)

    but no good whenever i check in YSlow there is no expires date on either my js or css file

    Tnx


Comments

  • Registered Users, Registered Users 2 Posts: 6,570 ✭✭✭daymobrew


    I don't know mod_expires.
    I wonder if it is the parameters to the min script that is causing mod_expires not to add an expires date.

    Can you try it without any parameters and set the data (g, t, debug, contentType within the script). If this works maybe you could change mod_rewrite to convert:
    min-g_jsmain-t_idrive-debug_1-contentType_1290177889-expires.js
    to:
    min/g=jsmain&t=idrive&debug=1&contentType=1290177889-expires.js
    Maybe:
    RewriteRule ^min-g_([a-z]*)-t_([a-z]*)-debug_([0-9]*)-contentType_([a-z]*)-expires.js min/g=$1&t=$2&debug=$3&contentType=$4 [L,NE]


Advertisement