2011-06-22 38 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>