Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Subdir中安装Joomla,在root中安装index.php?_Joomla - Fatal编程技术网

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

在Subdir中安装Joomla,在root中安装index.php?,joomla,Joomla,可以在子目录中安装Joomla并将index.php移动到根目录下吗。我知道这可以用WordPress来完成,但我似乎找不到Joomla的等价物 我已经在使用重定向,不是很好的重定向 我真的不希望所有的joomla文件夹都阻塞我的根目录 提前感谢,, sam制作虚拟主机会有帮助吗 不幸的是,乔姆拉!没有一种记录在案的方法来执行此操作。您可能可以在定义了JPATH_BASE常量和JURI类的地方更改代码,但您必须破解核心才能这样做。我知道它很旧,但我已经找到了这个问题的解决方案,不会强迫您访问系统

可以在子目录中安装Joomla并将index.php移动到根目录下吗。我知道这可以用WordPress来完成,但我似乎找不到Joomla的等价物

我已经在使用重定向,不是很好的重定向

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

提前感谢,,
sam制作虚拟主机会有帮助吗

不幸的是,乔姆拉!没有一种记录在案的方法来执行此操作。您可能可以在定义了
JPATH_BASE
常量和
JURI
类的地方更改代码,但您必须破解核心才能这样做。

我知道它很旧,但我已经找到了这个问题的解决方案,不会强迫您访问系统。 要重定向Joomla,您可以执行以下操作(它与:Joomla!2.5一起工作): 1.将.htaccess文件放入根web目录(通常为:
public\u 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]
  • 在Joomla
    config.php
    文件中,更改以下行:

    public$live\u site='1〕http://www.your-domain.com';

  • 将您的域更改为实际域