Forum Moderators: phranque
so if i have abc and def in the database, then the www.example.com/abc should be served by the script mentioned above (can be a redirection also), but the www.example.com/xyz should be handled by the apache (if it is a valid file/dir then process it; if it does not exists then send the browser away with a 404)
the website is used quite heavily (80k hits a day), so i need something which is quick enough and not resource intense (not like an external rewriting script, which is slow imho)
thanks
So, either the script can validate requests - checking for existence of a db record - on the fly, or it can create a RewriteMap dynamically, maybe once an hour, and overwrite the previous one. This latter approach might offer an overall speed advantage, but the RewriteMap won't be up-to-date more than once an hour. If it needs to be synchronized to the minute or second, then there is no advatage and you might as well use a script to do the db-record-exists checking. This could be your main script, or perhaps a separate one optimized for doing the check.
Jim
Your directory tree becomes your database, and Apache does indeed consult it before throwing an exception (or serving the page).
Of course all those generated statics are really just shells to your includes...