3
我有一個虛擬主機建立完美的WAMP是這樣的...WAMP虛擬主機AllowOverrides全部拋出500錯誤
#
# 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>
我正在上bot.dev Zend框架應用程序,所以我需要AllowOverrides爲Url工作。但是,當我將AllowOrverride
更改爲All
時,出現500內部服務器錯誤。
我會發送一些主要善意的共鳴給任何可以幫助我的人。
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]
不知道是什麼然而。
你應該張貼您的解決方案作爲一個答案,並標記問題通過驗證自己的答案解決。 – regilero 2012-05-29 12:10:37