假设我有域“example.com”,我想添加一个路由,例如当 URL 为“example.com/whatever/follows”时,它会重定向到“ http://www.example.com/whatever/follows ” "(也转发查询字符串)。
基本上我想将以下 Apache Rewrite 规则翻译成 Zend:
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,NC]
如果可能的话,我们怎么能做到这一点?
干杯,