态度决定高度、企图决定版图、格局决定结局

导航

zend + apache + config

采用虚拟目录方式:

 

一。apache中重写则配置如下:

1。 extra/httpd-vhosts.conf
<VirtualHost my.domain.com:80>
ServerName my.domain.com
ServerRoot /path/to/server/root/
DocumentRoot /path/to/server/root/my.domain.com/www

RewriteEngine off

<Location />
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\.(js|ico|gif|jpg|png|css)$ /index.php
</Location>
</VirtualHost>

2。 httpd.conf 配置

<Directory /path/to/server/root/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

二。独立.htaccess文件
1. 在/website/public/下创建.htaccess文件
2. 输入如下信息:
RewriteEngine on
RewriteBase /
RewriteRule !\.(js|ico|txt|gif|jpg|png|css)$ index.php

参考资料:http://framework.zend.com/wiki/display/ZFDEV/Configuring+Your+URL+Rewriter

posted on 2010-02-24 11:11  flyingchen  阅读(209)  评论(0编辑  收藏  举报