重写wordpress子域的规则

我有一个Zend Framework的PHP应用程序,它可以在www.mysite.com上正常工作,并使用标准的.htaccess文件和下列规则。

RewriteEngine on RewriteRule !\.(js|ico|gif|jpg|png|css|html)$ index.php 

我现在想在我的服务器上使用blog.mysite.com的子域添加一个WordPress的博客。 有一个名为blog的目录,里面有wordpress应用程序。 我现在需要编辑htaccess文件以允许博客目录显示wordpress博客。

目前我得到一个500错误。

任何想法,我真的没有一个线索,关于htaccess和重写规则。

非常感谢。

格兰特

您正在查看错误的位 – 您需要在Apacheconfiguration中实现VirtualHosts,而主要(默认)是已经运行的内容,而新的是您的博客。

 NameVirtualHost *:80 # first vhost is the default <VirtualHost *:80> ServerName www.mysite.com ... other config vars... </VirtualHost> <VirtualHost *:80> ServerName blog.mysite.com ...other config vars </VirtualHost> 

这就是你想要奠定你的基础,大量的例子在线,以帮助您正确configuration您的虚拟主机。