mod_rewrite Zend Server - PullRequest
       22

mod_rewrite Zend Server

0 голосов
/ 22 июня 2011

Не могу заставить мой mod_rewrite работать с Zend Server Мои URL дают следующую ошибку

Не найдено

запрошенный URL /forums/main-forum.2/ не было найдено на этом сервере.

http://pastebin.com/nki3uh8X

это мой http.conf

Приветствия

Ответы [ 3 ]

5 голосов
/ 29 июля 2011

Вы должны изменить:

AllowOverride None

до:

AllowOverride All

в вашем http.conf.

1 голос
/ 18 июля 2013

В Zend Server CE есть раздел, в котором httpd.conf устанавливает параметр AllowOverride для каталога www по умолчанию 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>
0 голосов
/ 16 февраля 2013

Помимо изменения httpd.conf в Apache2 / conf / hhtpd.conf, я также изменил файл .htaccess сайта, с которым у меня возникли проблемы, чтобы включить часть локального пути следующим образом:

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

В моем случае я использую Zend Server CE в качестве локального хоста на своей рабочей станции, и у меня есть несколько сайтов, работающих на базе dir /

...