WAMP虚拟主机AllowOverrides所有抛出500错误

liz*_*liz 3 apache wamp virtualhost

我有一个虚拟主机在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> 
Run Code Online (Sandbox Code Playgroud)

我在bot.dev上运行Zend Framework应用程序,所以我需要让AllowOverrides让url工作.但是,当我更改AllowOrverrideAll我得到500内部服务器错误.

我将向任何可以帮助我的人发出一些重要的善意.

更新:

我打开了服务器日志,发现以下错误......

D:/Work/BOT/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
Run Code Online (Sandbox Code Playgroud)

所以问题必须在.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]
Run Code Online (Sandbox Code Playgroud)

还不确定.

liz*_*liz 6

在这里找到答案:http://www.phpfreaks.com/forums/index.php?topic = 260159.0

启用名为mod_rewrite的Apache模块.

为此,请单击WAMP托盘图标,然后选择Apache>模块>重写模块