2010-02-14 95 views
0

我在設置了新的Apache dev PC上遇到了mod_rewrite的一些問題。mod_rewrite被忽略/不能正常工作

我已經啓用mod_rewrite作爲apache模塊並編輯conf文件以允許重寫,但是當我嘗試創建重寫時,什麼都不會發生。 htaccess文件在某種程度上被調用,因爲我可以通過在文件中加入無效的語法來導致500錯誤。

有人可以發現我正在做的愚蠢的錯誤或建議的東西,我錯過了需要啓用?

的httpd.conf:

<Directory /> 
    Options FollowSymLinks 
    AllowOverride All 
    Order deny,allow 
    Deny from all 
</Directory> 

的htaccess代碼:

RewriteEngine on 
RewriteBase/

RewriteRule ^content/css/([a-z0-9])/$ /min/?g=$1 [L] 

RewriteRule ^1.php$ 2.php 
+0

你可以顯示一個失敗的示例URL嗎? – 2010-02-14 16:59:23

+0

Localhost/content/css/1/just 404's localhost/1.php不顯示2.php的內容。 – rickhuby 2010-02-14 19:10:36

回答

0

你真的有

<Directory /> 
    ... 
    Deny from all 
</Directory> 

在httpd.conf? 你應該看到403錯誤是這種情況。