I have been bangin my head on this for a couple of months.

I have been to the apache site on the subject of URL rewriting and read and read until I am nearly blind and I still havent a clue.

The server I am on is an Apache 2 on a Linux install and it is a shared host.

The host provide a widgit to put in to play .htaccess and .htpasswd files to restrict access to folders. The host also confirms that the particular Apache engine is the 2.0 engine.

I want to take "ANY" request for .php and .db files in a folder called "data" to be rewritten to the site root so that the request serves up a new URL and the site loads.

http://my.website.com/data/{adbname}.db

where {adbname} is a random set of letters or numbers

I have tried looking at the REQUEST_URI to match ^/data/ or ^/data/*.\.php as well as ^data/[a-z0-9]+\.db or a straight forward ^\.php and ^\.db look for the extentions and then redirect.

Simply put, its still allowing download of the .db files stored in the folder. Something that I am trying to prevent.

I have lost count of the number of sites that profess to help and TBH, as a beginner in theis URL rewriting game, help is very very thin on the ground, thes sites are either "baby talk" or "Uber geek" and no happy medium nor do any of the sites so far give any practical examples of real working .htaccess.

Even trying examples, they are not working.

I have asked the host several times now and I think that they are getting fed up of me asking them to check the config for the server.

Any .htaccess & .htpasswd files written by the web host CGI program work fine. When I upload a file I have written... flat on its face.

Can some one give me an example of what I need to be looking at?