將zf project放於Directory下,不另外設定VirtualHost

  • Project置放於Apache htdocs下
  • 於Project下新增檔案:.htaccess

該檔案結構如下:

RewriteEngine on

RewriteRule (.*) ./public/$1

  • http.conf的Directory改成下面設定:

<Directory "C:\Program Files\Zend\Apache2/htdocs">

Options Indexes FollowSymLinks

AllowOverride All

Order allow,deny

Allow from all

</Directory>

  • 重新啟動Apache

沒有留言:

橫式廣告