У меня виртуальный хост отлично настроен на WAMP, вот так ...
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:80>
DocumentRoot "C:/wamp/www"
ServerName localhost
ServerAlias localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "D:\Work\BOT\public"
ServerAlias bot.dev
ServerName bot.dev
<Directory "D:\Work\BOT\public">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Я запускаю приложение Zend Framework на bot.dev, поэтому мне нужно AllowOverrides, чтобы URL-адреса работали. Однако, когда я изменяю AllowOrverride
на All
, я получаю 500 Internal Server Error.
Я буду посылать некоторые основные добрые пожелания всем, кто может мне помочь с этим.
UPDATE:
Я открыл журнал сервера и обнаружил следующую ошибку ...
D:/Work/BOT/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
Так что проблема должна быть в .htaccess:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
Не уверен, что еще.