Apache RewriteMap无法找到外部文件中存在的URL

时间:2019-04-25 15:23:44

标签: apache mod-rewrite url-rewriting rewritemap

如何检查某些外部文件中是否存在url。

只需检查给定的请求URI在虚荣网址列表中即可。

虚拟网址的文件位于/mnt/var/www/html/vanity_urls.txt

RewriteCond ${vanityurls:%{REQUEST_URI}|NONE} ^(.+)$
RewriteCond ${vanityurls:$1} >""
RewriteRule ^/(.*)$ /$1 [PT,L]```
Map filename contains same key value pair just for loading purpose to map . My use case is simply to check given request url is a vanity url or not.

Example - /clinicaltrials /clinicaltrials

0 个答案:

没有答案