开发者

mod_rewrite Zend Server

Can not get my mod_rewrite to work with Zend Server My urls are giving t开发者_如何学Gohe 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


You should change:

AllowOverride None

to:

AllowOverride All

in your http.conf.


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>


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 /

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜