Welcome Guest, Not a member yet? Register   Sign In
Multiple .htaccess
#9

[eluser]simshaun[/eluser]
/admin is not an actual directory.

At first I was attempting <Directory> but then found <LocationMatch>, which is how I would achieve this.
The only thing is, both <Directory> and <LocationMatch> are not allowed in .htaccess, so Apache's httpd.conf file needs to modified instead.

So, I use a <LocationMatch> tag and I came up with this: (which I'm pretty sure works):
Code:
<LocationMatch "/admin">
    # 2 weeks
    <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
        Header set Cache-Control "max-age=1209600"
    </FilesMatch>
</LocationMatch>


Messages In This Thread
Multiple .htaccess - by El Forum - 01-12-2009, 02:56 PM
Multiple .htaccess - by El Forum - 01-12-2009, 04:10 PM
Multiple .htaccess - by El Forum - 01-12-2009, 04:22 PM
Multiple .htaccess - by El Forum - 01-12-2009, 04:37 PM
Multiple .htaccess - by El Forum - 01-12-2009, 04:53 PM
Multiple .htaccess - by El Forum - 01-12-2009, 05:42 PM
Multiple .htaccess - by El Forum - 01-12-2009, 06:02 PM
Multiple .htaccess - by El Forum - 01-12-2009, 06:27 PM
Multiple .htaccess - by El Forum - 01-12-2009, 06:54 PM
Multiple .htaccess - by El Forum - 01-12-2009, 07:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB