Apache 310 重定向,带通配符 URL

Apache 310 重定向,带通配符 URL

我正在尝试重定向这个... http://www.wfmc.org/administrator/components/com_civicrm/civicrm/extern/url.php?u=878&qid=3686395 -- 其中 '&qid=3686395' 因链接而异。我怎样才能重定向所有看起来像这样的内容 'http://www.wfmc.org/administrator/components/com_civicrm/civicrm/extern/url.php?u=878' 它将负责处理 878 之后转移到另一个网站的所有事情。

答案1

我假设您的 apache 配置为服务“www.wfmc.org”。在您的 vhost 或 .htaccess 文件中(假设您已为域的 documentroot 启用 Options FileInfo):

重写规则 ^administrator/components/com_civicrm/civicrm/extern/url.php?u=878(.*)http://某个URL/某个文件?$1 [大]

那应该可以。

相关内容