mod_rewrite Zend 服务器

发布于 2024-11-16 17:27:53 字数 283 浏览 6 评论 0原文

无法让我的 mod_rewrite 与 Zend Server 一起使用 我的网址出现以下错误

未找到

请求的URL /forums/main-forum.2/ 不是 在此服务器上找到。

http://pastebin.com/nki3uh8X

这是我的 http.conf

干杯

Can not get my mod_rewrite to work with Zend Server
My urls are giving the following error

Not Found

The requested URL
/forums/main-forum.2/ was not
found on this server.

http://pastebin.com/nki3uh8X

this is my http.conf

Cheers

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

庆幸我还是我 2024-11-23 17:27:53

您应该

AllowOverride None

:更改为:。

AllowOverride All

http.conf 中将

You should change:

AllowOverride None

to:

AllowOverride All

in your http.conf.

那一片橙海, 2024-11-23 17:27:53

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>

Zend Server CE has a section on it's httpd.conf setting AllowOverride for the default www directory to None. On my Zend httpd.conf this is between lines 195 and 220. You must set it to: AllowOverride All in order to mod_rewrite work in the default Zend htdocs directory.

<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>
昵称有卵用 2024-11-23 17:27:53

除了更改 Apache2/conf/hhtpd.conf 中的 httpd.conf 之外,我还更改了遇到问题的站点的 .htaccess 文件,以包含本地路径的一部分,如下所示:

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

在我的例子中,我使用 Zend服务器 CE 作为我的工作站上的本地主机,我有几个站点在基本目录 / 上运行

Besides changing the httpd.conf in Apache2/conf/hhtpd.conf, I also changed the .htaccess file of the site I was having problems with to include the a piece of the local path as follows:

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

In my case, I use the Zend Server CE as localhost on my workstation and I have several sites running on the base dir /

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文