2009-04-14 50 views
0

是否有可能在一個子目錄中安裝Joomla並將index.php移動到根目錄。我知道這可以用WordPress來完成,但我似乎無法找到Joomla Equivalent。Joomla安裝在Subdir中,index.php在root?

我已經在使用重定向了,而不是很好。

我真的不希望所有joomla文件夾堵塞我的根目錄。

由於提前, SAM

回答

1

不幸的是,Joomla!沒有形成文件的方式。您可能可以更改常量和JURI類定義的代碼,但是您肯定必須破解內核才能這樣做。

0

將使得虛擬主機的幫助?

0

我知道這是舊的,但我找到了這個問題的解決方案,不要強迫你做系統。 要重定向的Joomla你可以這樣做(它與:的Joomla 2.5): 1.將.htaccess文件到你的根Web目錄(通常是:public_html),此代碼:

# .htaccess main domain to subfolder redirect 
# Copy and paste the following code into the .htaccess file 
# in the public_html folder of your hosting account 
# make the changes to the file according to the instructions. 

# Do not change this line. 
RewriteEngine on 

# Change yourdomain.com to be your main domain. 
RewriteCond %{HTTP_HOST} !^www. 
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] 

# Change 'subfolder' to be the folder you will use for your main domain. 
RewriteCond %{REQUEST_URI} !^/subfolder/ 

# Don't change these lines. 
# You may have to comment this if You i.e. have na `index.php` file which You dont want load 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 

# Change 'subfolder' to be the folder you will use for your main domain. 
RewriteRule ^(.*)$ /subfolder/$1 [L] 

# Change yourdomain.com to be your main domain again. 
# Change 'subfolder' to be the folder you will use for your main domain 
# followed by/then the main file for your site, index.php, index.html, etc. 
RewriteCond %{HTTP_HOST} ^(www.)?{HTTP_HOST}$ [NC] 
RewriteRule ^(/)?$ /subfolder/index.php [L] 
  1. 在您的Joomla config.php文件,恰克這一行:

    public $live_site = 'http://www.your-domain.com';

改變你的域名爲您的行爲ual域。