Apache:使用 RewriteMap 进行重定向不起作用

Apache:使用 RewriteMap 进行重定向不起作用

我最近将我的个人博客迁移到另一个发布系统。因此我想将旧方案的 URL 重定向到新方案。

我有一个如下所示的重定向映射(我的域名是ailothaen.fr):

/a/?d=2017/02/22/11/00/53-les-conteneurs-une-nouvelle-fonctionnalite-tres-interessante-de-firefox https://ailothaen.fr/a/?post/2017/02/Les-conteneurs%2C-une-nouvelle-fonctionnalit%C3%A9-tr%C3%A8s-int%C3%A9ressante-de-Firefox
/a/?d=2017/06/24/15/00/00-les-raccourcis-dans-firefox https://ailothaen.fr/a/?post/2017/06/Les-raccourcis-dans-Firefox
/a/?d=2017/07/08/11/55/06-changer-les-icones-de-7zip https://ailothaen.fr/a/?post/2017/07/Changer-les-icones-de-7zip

我将其放入我的虚拟主机配置中:

# 301 redirect old blog URLs
RewriteMap oldBlogSystem "txt:/etc/apache2/maps/oldBlogSystem.txt"
RewriteCond ${oldBlogSystem:$1} !=""
RewriteRule ^(.*)$ ${oldBlogSystem:$1} [R=301,L]

但是,当我尝试访问 时,例如 ,ailothaen.fr/a/?d=2017/07/08/11/55/06-changer-les-icones-de-7zip该 URL 并没有被重定向,就像它没有被重定向系统捕获一样。

我尝试在地图文件中删除或添加域,但重定向仍然不起作用。我是不是遗漏了什么?

相关内容