2011-06-22 37 views
0

不能讓我的mod_rewrite的使用Zend服務器 我的網址是給下面的錯誤mod_rewrite的Zend服務器

未找到

請求的URL /forums/main-forum.2/是工作而不是 在此服務器上找到。

http://pastebin.com/nki3uh8X

這是我的http.conf

乾杯

+2

什麼是要求的網址?出現錯誤時位於地址欄中的網址?什麼是你的重寫規則(在你的例子中,我沒有看到任何看起來像'RewriteRule XXX YYYY'的東西,你嘗試過了什麼?順便說一句,我認爲這個問題可以在風格上得到改善,它看起來像是'pleaze gimme teh codez' –

回答

5

你應該改變:

AllowOverride None 

到:

AllowOverride All 

在您的http.conf

+0

這對我有效,謝謝。 –

0

除了在的Apache2/CONF/hhtpd.conf改變的httpd.conf,我也改變我是有問題的部位htaccess的文件以包括一塊本地路徑的如下:

RewriteRule .* /CRC/index.php [L] 

就我而言,我使用Zend Server CE中爲localhost我的工作站上,我對底層目錄運行多個網站/

1

Zend服務器CE上有一個部分的httpd.conf設置的AllowOverride默認WWW目錄爲無。在我的Zend httpd.conf中,這是在第195行和第220行之間。必須將它設置爲:AllowOverride All才能在默認的Zend htdocs目錄中mod_rewrite工作。

<Directory "C:\Program Files (x86)\Zend\Apache2/htdocs"> 
# 
# Possible values for the Options directive are "None", "All", 
# or any combination of: 
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews 
# 
# Note that "MultiViews" must be named *explicitly* --- "Options All" 
# doesn't give it to you. 
# 
# The Options directive is both complicated and important. Please see 
# http://httpd.apache.org/docs/2.2/mod/core.html#options 
# for more information. 
# 
Options Indexes FollowSymLinks 
# 
# AllowOverride controls what directives may be placed in .htaccess files. 
# It can be "All", "None", or any combination of the keywords: 
# Options FileInfo AuthConfig Limit 
# 
AllowOverride All 
# 
# Controls who can get stuff from this server. 
# 
Order allow,deny 
Allow from all 
</Directory>