提问人:Maciek 提问时间:8/30/2023 更新时间:8/30/2023 访问量:5
Apache RedirectMatch 未按预期工作
Apache RedirectMatch not Working as Expected
问:
我想匹配一组子文件夹并将它们重定向到相应的子域。请注意,有一个通配符域名后缀。我希望它适用于多个 TLD,例如 或 。.com
.ca
RedirectMatch "^example\.(.*)/(article|company)/" "https://$2.example.$1"
例子:
https://example.com/article/test-article → https://article.example.com/test-article
https://example.ca/article/test-article-ca → https://article.example.com/test-article-ca
https://example.com/company/test-company → https://company.example.com/test-company
RedirectMatch 可以做到这一点吗?我做的那个有什么问题?
答: 暂无答案
评论