All page names should generate from the database
for example
/mysite/generatepage.php?id=somename
/mysite/somename.html
it is a waste of time and effort to
not have all the page name generate automatically
the rewrite rule
RewriteEngine on
RewriteRule ([^/\.]+)/?.html$ viewPage.php?ID=$1 [L]
, and taken directly from the manual, does just that.
google how to apache mod_rewrite for other examples
if you have not already set up a standardised naming system for your site,
stop now, set up a system, then write a rewrite rule to match the system
you get
- sensible sitemap
- logical urls
- a tree structure
- user friendly
- Search engine friendly
1000s of individual rules will just give you a site you cannot even maintain
If it is beyond your skills to generate that rule,
rt_m, there is an example there that shows full tree structure from a single rewrite rule
ask,
ask again,
until one of the answers makes sense,
once the rules for database creation, and mod_rewrite are set, there will be no need to create more rules