我正在从 zeus 平台迁移到 apache,并且在以下重写时遇到问题:
/12345-somepage.html
/event.php?ref=12345
这是.htaccess
RewriteEngine on
RewriteRule ^/([0-9]*)- /event.php?ref=$1 <-- This doesn't work 404 not found
RewriteRule ^otherpage.htm index.php?Month=0&Category=otherpage <- This one works
这是现有的宙斯重写规则:
match URL into $ with ^/([0-9]*)-
if matched then set URL = /event.php?ref=$1
我已经验证目标地址有效,即/event.php?ref=12345