2012-09-13 183 views
0

我使用ISPConfig 3來管理我的域/子域。VHost&htaccess - 500內部服務器錯誤

我添加子域名parim.kristian.ee這將重定向到web/parim/注:網/是我的文檔根目錄)。

ISPConfig產生這種重定向到Apache的配置:

RewriteEngine on 
RewriteCond %{HTTP_HOST} ^parim.kristian.ee [NC] 
RewriteRule ^/(.*)$ /parim/$1 [L] 

現在,如果我要想方設法把靜態資源,如http://parim.kristian.ee/images/1x1.gif,它服務很好,但是當重定向是笨,這是行不通的。

的.htaccess中web/parim/看起來是這樣的:

<IfModule mod_rewrite.c> 
    RewriteEngine on 

    Options -Indexes 

    #Handle CodeIgniter request 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteRule ^(.*)$ ./index.php?/$1 [L] 
</IfModule> 
<IfModule !mod_rewrite.c> 
    ErrorDocument 404 ./index.php 
</IfModule> 

注:通過http://kristian.ee/parim/工作訪問同一個文件夾!

我在* htaccess的* ck,所以任何幫助表示讚賞。

回答

0
# To remove index.php from URL 

RewriteEngine On 
RewriteBase /parim 
RewriteCond %{REQUEST_URI} ^system.* 
RewriteRule ^(.*)$ /index.php/$1 [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php/$1 [L] 

或簡單的刪除RewriteBase/PARIM