我剛剛部署了一個使用Zend Framework的新網站。由於我的教程很受歡迎,我希望將對教程的任何請求重定向到新網站上的相關頁面。到目前爲止,這是我有:如何在Zend Framework中使用mod_rewrite?
URL重寫前:重寫後http://neranjara.org/tutorials/?tid=56
網址:http://neranjara.org/article/id/56
的.htaccess文件我嘗試使用看起來像這樣:
$ cat html/.htaccess RewriteEngine on RewriteRule tutorials/\?tid=(.*)$ /article/id/$1 [R=301] RewriteRule !\.(js|ico|gif|jpg|png|css|xml|phps)$ index.php
但是這個規則不匹配任何網址...:'(
是否有任何人在這裏看到一個問題