我制作了zend项目,它可以正常工作,没有任何问题。我使用别名创建了新的虚拟主机,如下所示。
<VirtualHost *:80>
DocumentRoot "/home/dinuka/workspace/peye_backend/public"
ServerName peye.test.com
<Directory "/home/dinuka/workspace/peye_backend/public">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Alias /new /home/dinuka/workspace/peye_backend_new/public
<Directory "/home/dinuka/workspace/peye_backend_new/public">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
我在 /home/dinuka/workspace/peye_backend_new/public 的 .htaccess 是
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ /new/index.php [NC,L]
现在url 正在工作peye.test.com
,peye.test.com/new
他们重定向到不同的站点。但有时它会重定向到 peye.test.com/new/new
我调试了 from 控制器,发现它是从Zend_Db_Table_Abstract
类重定向的。
class Eme_Peye_Models_DbTable_Directorytypes extends Zend_Db_Table_Abstract
{
protected $_name = 'dir_types';
protected $_sequence = 'dir_types_dir_type_id_seq';
public function getAllDirectorytypes($order = 'dir_type_name')
{
//die('Now works')
$select = $this->select()
->from($this, array('key'=>'dir_type_id', 'value'=>'dir_type_name'))
->order($order);
//die('Not working')
return $this->fetchAll($select)->toArray();
}
}
我无法用另一种方式来描述这个问题。请帮我。我认为这个问题来自apache。