mod_rewrite Zend Server

你离开我真会死。 提交于 2019-12-13 06:35:13

问题


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


回答1:


You should change:

AllowOverride None

to:

AllowOverride All

in your http.conf.




回答2:


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>



回答3:


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 /



来源:https://stackoverflow.com/questions/6436416/mod-rewrite-zend-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!