.htaccess rewrite with dynamic script?
i use the HeliconTech ModRewrite v3 on an Windows/IIS Webserver to make rewrites via an .htaccess File.
i have a db-Table with filename's to id's and want to a rewrite incoming urls with this constantly changing list.
Normaly, if using a map/list i use this code:
#RewriteRule ^content/(.+)\.asp$ default.asp?ID=${map:$1} [L,NC]
With makes *content/some_site.asp* to default.asp开发者_StackOverflow?id=123
Is it possible to fill the mapping file dynamic, e.g. via php or asp script?
If you are on IIS 7 then you can use Helicon Ape instead. It is compatible with ISAPI_Rewrite 3 and it supports database maps.
Introduction to database functionality of Helicon Ape
mod_dbd adticles
Unfortunately not -- ISAPI_Rewrite v3 does not support prg: type of mapping: see the Apache mod_rewrite compatibility page for exact details.
精彩评论