2012-08-14 35 views
0

此規則運作良好的基於​​Linux機器上:mod_rewrite的工作在Linux,但Windows

RewriteRule ^([^/]*)/([^/]*)$ /index.php?page=$1&id=$2 [L] 

但基於Windows不會。也許還有另一種方式可以使它在兩個系統上都能工作?

+0

你使用Apache或IIS? – Mahoor13 2012-08-14 18:14:26

+0

apache(xampp)。 – ZeroSuf3r 2012-08-15 17:35:42

+0

xampp服務器中的mod_rewrite模塊默認是禁用的。在apache/conf/httpd.conf中搜索並激活它(刪除#),然後重新啓動apache服務器。 – Mahoor13 2012-08-23 05:38:06

回答

0

你是什麼意思「它不工作」在Windows上?我很確定這是mod_rewrite在Windows設置上的問題,並且與此特定規則無關。我猜如果你看看apache_get_modules(),你會發現它沒有列出。

+0

嗯,它沒有,嘗試了WampServer和xampp。 Evene http:// localhost/images或http:// localhost/javascript或其他文件夾。如果我從.htaccess everythink工作中刪除該規則... – ZeroSuf3r 2012-08-15 15:01:28

相關問題