Joel W. Leibow wrote:
>Alright, I have developed a site that is making extensive use of the rewrite
>module in apache. For example, I have a RewriteMap created that has each
>state listed in it with a corresponding ID relative to the primary key in a
>table in the database. This allows me to search the url for any occurrence
>of /[a-z]+/ and look it up in the RewriteMap. If it matches, the
>corresponding ID is returned and I can query the database with that ID
>
>The problem that I am having is that I also have about 18,000
>sub-directories that I would like to fake. Each directory could also match
>the pattern /[a-z]+/. I don't want to look up the pattern in the RewriteMap
>unless it is definitely a state name. Instead I would like to pass the
>"/sub-directory" that has been requested via the query string for pulling
>info from a database. How do I go about distinguishing each state from each
>possible sub-directory without having to write a regular expression to match
>each state name? I was thinking that RewriteCond could help but am
>uncertain how exactly to use that portion of the rewrite module. Advice?
>
>I realize this is pretty complex, but hopefully my description makes sense.
>Any advice or input would be greatly appreciated.
>
>Joel Leibow
>
>---------------------------------------------------
>PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
>To subscribe, unsubscribe, or to change you mail settings:
>http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>
>
Why not do it a different way?
I've done this in the past where I wanted to have information in the URL
by using the force type directive
and my favorite scripting language.
In this example, anytime /public/* is in the URL the script runs instead
of actually looking for a directory.
Heres the gist of it:
in httpd.conf: