Subdir中的Joomla安装,root中的index.php?

时间:2009-04-14 14:28:06

标签: joomla

是否可以在子目录中安装Joomla并将index.php移动到根目录。我知道这可以用WordPress完成,但我似乎无法找到Joomla Equivalent。

我已经在使用重定向,而不是非常好的重定向。

我真的不希望所有joomla文件夹都堵塞我的根目录。

提前致谢, SAM

3 个答案:

答案 0 :(得分:1)

不幸的是,Joomla!没有记录的方法这样做。您可能能够更改定义JPATH_BASE常量和JURI类的代码,但您肯定必须破解核心才能这样做。

答案 1 :(得分:0)

让虚拟主机帮忙吗?

答案 2 :(得分:0)

我知道它已经过时了,但我找到了这个问题的解决方案,这个问题不会强迫你破解系统。 重定向Joomla你可以做(​​它适用于:Joomla!2.5): 1.使用以下代码将.htaccess文件放入您的根网站目录(通常是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';

  2. 更改您的实际域名。