2013-06-03 44 views
0

我在我的域中托管一个Wordpress页面,并且我想创建一个子域以便托管一个wiki页面。更改.htaccess文件,以允许子域名

例子:

www.foowordpress.com -> Points to a Wordpress blog 
wiki.foowordpress.com -> It should point to a Media Wiki page 

似乎由WordPress产生的.htaccess重定向所有子域名WordPress的索引页。

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase/
RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /index.php [L] 
</IfModule> 

可能有人建议如何改变这种.htaccess文件为了不重定向维基域名?

我已经配置了我的DNS管理器和我的VirtualHost来创建这个子域。

回答

0

事实证明,我没有正确配置VirtualHost文件,没有任何错误的.htaccess文件。

这里是在任何情况下的子域我的虚拟主机文件发现它有用:

<VirtualHost *:80> 
    # Admin email, Server Name (domain name), and any aliases 
    ServerAdmin [email protected] 
    ServerName www.wiki.foo.com 
    ServerAlias wiki.foo.com 

    # Index file and Document Root (where the public files are located) 
    DirectoryIndex index.html index.php 
    DocumentRoot /var/www/wiki.foo.com/ 

    # Log file locations LogLevel warn ErrorLog 
    /var/log/apache2/wiki.foo.com/error.log CustomLog 
    /var/log/apache2/wiki.foo.com/access.log combined 
</VirtualHost>