Created
January 28, 2019 09:08
-
-
Save 0GiS0/f27318d387217106d6a3bb0f629a594d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<clear /> | |
<rule name="BlockAccessToPublic" patternSyntax="Wildcard" stopProcessing="true"> | |
<match url="*" /> | |
<conditions logicalGrouping="MatchAll" trackAllCaptures="false"> | |
<add input="{URL}" pattern="/public/*" /> | |
</conditions> | |
<action type="CustomResponse" statusCode="403" statusReason="Forbidden: Access is denied." statusDescription="You do not have permission to view this directory or page using the credentials that you supplied." /> | |
</rule> | |
<rule name="RewriteAssetsToPublic" stopProcessing="true"> | |
<match url="^(.*)(\.css|\.js|\.jpg|\.png|\.gif|\.ico)$" /> | |
<conditions logicalGrouping="MatchAll" trackAllCaptures="false"> | |
</conditions> | |
<action type="Rewrite" url="public/{R:0}" /> | |
</rule> | |
<rule name="RewriteRequestsToPublic" stopProcessing="true"> | |
<match url="^(.*)$" /> | |
<conditions logicalGrouping="MatchAll" trackAllCaptures="false"> | |
</conditions> | |
<action type="Rewrite" url="public/index.php/{R:0}" /> | |
</rule> | |
</rules> | |
</rewrite> | |
</system.webServer> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment