Tell me more ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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?

share|improve this question
2  
Any reason why your sqlite file has to be placed inside your web root? – Lèse majesté Apr 1 '12 at 21:00
1  
at this point no, but this is making me mad that I can't get htaccess to work how it should – BHare Apr 1 '12 at 23:00
1  
What's the AllowOverride setting for that directory? Also, for future reference, you don't need to restart Apache for .htaccess changes to take effect. – Lèse majesté Apr 1 '12 at 23:14

2 Answers

Send it a 404!

RewriteEngine On
RewriteCond %{REQUEST_URI} (.*).db [NC]
RewriteRule ^(.*)$ 404.html [R=404,L]
share|improve this answer
or 301 to root page – b1- Jan 17 at 10:28

SQLLite database is for Android Applications. It has no relation with httaccess. httaccess file resides in the XAMPP/WAMP/LAMP folder you installed. You could be asking to download the SQL file. It can be done by clicking Export button in you phpMyAdmin page. If I am wrong then please state how you are facing problem.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.