Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FilesMatch issue detecting extensions #29

Open
myrandor opened this issue Mar 1, 2023 · 1 comment
Open

FilesMatch issue detecting extensions #29

myrandor opened this issue Mar 1, 2023 · 1 comment

Comments

@myrandor
Copy link

myrandor commented Mar 1, 2023

Using this htaccess, any images with png extensions are denied, which shouldn't happen.

<FilesMatch "\.(png)$">
    <IfModule version.c>
        <IfVersion >= 2.4>
            Require all granted
        </IfVersion>
        <IfVersion < 2.4>
            Allow from all
        </IfVersion>
    </IfModule>
</FilesMatch>
<FilesMatch "\.*$">
    <IfModule version.c>
        <IfVersion >= 2.4>
            Require all denied
        </IfVersion>
        <IfVersion < 2.4>
            Deny from all
        </IfVersion>
    </IfModule>
</FilesMatch>
@impsj
Copy link

impsj commented Mar 15, 2023

This one is working. I don't know if the filesmatch .* get everything and doesn't go test png...

<IfModule version.c>
	<IfVersion >= 2.4>
		Require all denied
	</IfVersion>
	<IfVersion < 2.4>
		Deny from all
	</IfVersion>
</IfModule>
<FilesMatch "\.(png)$">
	<IfModule version.c>
        <IfVersion >= 2.4>
            Require all granted
        </IfVersion>
        <IfVersion < 2.4>
            Allow from all
        </IfVersion>
	</IfModule>
</FilesMatch>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants