无法让我的 mod_rewrite 与 Zend Server 一起工作我的网址出现以下错误
未找到
在此服务器上找不到请求的 URL /forums/main-forum.2/。
这是我的 http.conf
干杯
无法让我的 mod_rewrite 与 Zend Server 一起工作我的网址出现以下错误
未找到
在此服务器上找不到请求的 URL /forums/main-forum.2/。
这是我的 http.conf
干杯
你应该改变:
AllowOverride None
至:
AllowOverride All
在你的http.conf
.
Zend Server CE 在它的 httpd.conf 中有一个部分,将默认 www 目录的 AllowOverride 设置为 None。在我的 Zend httpd.conf 中,它位于第 195 和 220 行之间。您必须将其设置为: AllowOverride All 以便 mod_rewrite 在默认的 Zend htdocs 目录中工作。
<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>
除了更改 Apache2/conf/hhtpd.conf 中的 httpd.conf 之外,我还更改了我遇到问题的站点的 .htaccess 文件,以包含以下本地路径:
RewriteRule .* /CRC/index.php [L]
在我的情况下,我在我的工作站上使用 Zend Server CE 作为 localhost,并且我有几个站点在基本目录 /