2013-06-03 43 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>