Mobile app version of vmapp.org
Login or Join
Gretchen104

: Htaccess preventing sqlite database being downloaded I have a VPS, running apache2 on Debian 6. Created a file called .htaccess on the web root, which included: <Files ~ ".db$"> Order

@Gretchen104

Posted in: #Apache2 #Htaccess #Php

I have a VPS, running apache2 on Debian 6.

Created a file called .htaccess on the web root, which included:

<Files ~ ".db$">
Order allow,deny
Deny from all
</Files>

<FilesMatch ".db$">
Deny from all
</FilesMatch>


Can still manually download the database.db file that exists in the same directory as the .htaccess file. Restarted Apache2, same.

What gives?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Gretchen104

1 Comments

Sorted by latest first Latest Oldest Best

 

@Vandalay111

Send it a 404!

RewriteEngine On
RewriteCond %{REQUEST_URI} (.*).db [NC]
RewriteRule ^(.*)$ 404.html [R=404,L]

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme