Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

weird .htaccess rule RedirectMatch


Go to End


6 Posts   1658 Views

Avatar
freakout

Community Member, 49 Posts

28 January 2013 at 11:31pm

can somebody tell me what's the purpose of the .htaccess rule is:

RedirectMatch 403 /silverstripe-cache(/|$)

even the apache doc cannot clearify this.
This rule is inserted into .htaccess by install.php

Avatar
(deleted)

Community Member, 473 Posts

29 January 2013 at 7:55am

It denies access to anyone trying to access the silverstripe-cache folder (if one exists)

Avatar
freakout

Community Member, 49 Posts

29 January 2013 at 11:09pm

With 2 parameters this statement is completely nonsense and does nothing.
The 304 status is interpreted as a matching condition this way!
See apache docs for setting up this correctly.

Avatar
(deleted)

Community Member, 473 Posts

30 January 2013 at 8:25am

The status argument is a 403, thus the URL to redirect to must be omitted (as detailed in the docs for Redirect, which RedirectMatch is equivalent to beyond regex support). The statement is perfectly correct.

Avatar
freakout

Community Member, 49 Posts

30 January 2013 at 9:24am

Sorry - your are right - i did miss to read the Redirect docs.
But i'm still confused. Why should an URL of /silverstripe-cache gain access to Path /tmp/silverstripe-cache-home-... ?

Avatar
(deleted)

Community Member, 473 Posts

30 January 2013 at 9:32am

It doesn't, but you can have a silverstripe-cache folder in your site root instead of the one in /tmp (which is a fairly common practice on shared hosts). This rule is to stop access to that folder.