0
面臨htaccess的問題,我創建了一個子域,但是當我在瀏覽器中訪問過它的給予500內部服務器錯誤。子域
子域:sub.domain.com 目錄:/子
下面是關於htaccess文件/:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase/
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
RewriteCond %{HTTP_HOST} ^domain\.com [NC]
RewriteRule (.*) http://www.domain.com/ [L,R=301]
</IfModule>
我需要在我的htaccesss文件添加任何東西,使其工作。
更新:----------------------------------
另外我的主域名工作好,沒有問題。
<IfModule mod_rewrite.c>
RewriteEngine On
# NOTE: change this to your actual StatusNet base URL path,
# minus the domain part:
#
http://sub.domain.com/ =>/
http://sub.domain.com/mublog/ => /mublog/
#
RewriteBase /mublog/
## Uncomment these if having trouble with API authentication
## when PHP is running in CGI or FastCGI mode.
#
#RewriteCond %{HTTP:Authorization} ^(.*)
#RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php?p=$1 [L,QSA]
</IfModule>
<FilesMatch "\.(ini)">
Order allow,deny
</FilesMatch>
好吧,讓我來試試這個,謝謝。 –
不,它不能工作 –
如果你仍然得到子域名500,然後發佈子域的.htaccess。 – anubhava