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
Mod rewrite 重写Joomla问题中的基础_Mod Rewrite_Joomla - Fatal编程技术网

Mod rewrite 重写Joomla问题中的基础

Mod rewrite 重写Joomla问题中的基础,mod-rewrite,joomla,Mod Rewrite,Joomla,我最近更换了服务器并移动了站点。早些时候,该站点位于服务器的根目录中。现在它位于public_html/joomla.com文件夹下 问题是我所有的链接都不工作。他们抛出了404页面未找到错误 我的htaccess如下所示 `# mod_rewrite in use ########## Begin - Rewrite rules to block out some common exploits ## If you experience problems on your site block

我最近更换了服务器并移动了站点。早些时候,该站点位于服务器的根目录中。现在它位于public_html/joomla.com文件夹下

问题是我所有的链接都不工作。他们抛出了404页面未找到错误

我的htaccess如下所示

`#  mod_rewrite in use
########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
## Deny access to extension xml files (uncomment out to activate)
#<Files ~ "\.xml$">
#Order allow,deny
#Deny from all
#Satisfy all
#</Files>
## End of deny access to extension xml files
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits

#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update Your Joomla! Directory (just / for root)

# RewriteBase /

########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$  [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
#php_value post_max_size 5M
#php_value upload_max_filesize 5M
########## End - Joomla! core SEF Section
`
`mod#u重写正在使用中
##########开始-重写规则以阻止一些常见的漏洞攻击
##如果您的网站出现问题,请排除下面列出的操作
##这将试图阻止对Joomla的最常见类型的利用“尝试”!
#
##拒绝访问扩展xml文件(取消注释以激活)
#
#命令允许,拒绝
#全盘否定
#满足所有
#
##拒绝访问扩展xml文件的结束
重写cond%{QUERY\u STRING}mosConfig\[a-zA-Z\]{1,21}(\\%3D)[或]
#阻止任何试图通过URL发送base64_编码垃圾的脚本
重写cond%{QUERY_STRING}base64_encode.\(.*)[或]
#阻止在URL中包含标记的任何脚本
重写条件%{QUERY\u STRING}(\\\\%3E)[NC,或]
#阻止任何试图通过URL设置PHP全局变量的脚本
重写条件%{QUERY\u STRING}全局(|\[|\%[0-9A-Z]{0,2})[或]
#阻止任何试图通过URL修改_请求变量的脚本
重写条件%{QUERY\u STRING}\u请求(|\[|\%[0-9A-Z]{0,2})
#将所有被阻止的请求发送到主页,出现403禁止错误!
重写规则^(.*)$index.php[F,L]
#
##########结束-重写规则以阻止一些常见的漏洞攻击
#如果您的Web服务器的URL
#与物理文件路径没有直接关系。
#更新Joomla!目录(仅适用于根目录)
#重写基/
##########开始-Joomla!核心SEF部分
#
重写cond%{REQUEST_FILENAME}!-f
重写cond%{REQUEST_FILENAME}!-d
重写cond%{REQUEST_URI}!^/index.php
重写cond%{REQUEST|u URI}(/|\.php|\.html|\.htm|\.feed |\.pdf|\.raw |/[^.]*)$[NC]
重写规则(.*)index.php
重写规则。*-[E=HTTP\U授权:%{HTTP:AUTHORIZATION},L]
#
#php_值后最大尺寸5M
#php\u值上传\u最大\u文件大小5M
##########完-Joomla!核心SEF段
`
我怀疑reqritebase的问题-这是问题还是我如何才能恢复所有链接以正常工作

请尽快帮忙


谢谢

替换此行:

# RewriteBase /
与:

RewriteBase /joomla.com

您是否在configuration.php中更改了live_site变量?在我看来,您已将站点移动到一个新域名?我已将其移动到具有相同域名的新主机提供商。因此,我没有发现需要更改live site url。配置文件中仍然显示此var$live_site='';您可以移动joomla文件夹和文件吗从public_html/joomla.com到public_html?还要检查托管cpanel中的panamainsider.com是否指向public_html文件夹和joomla.com(public_html是服务器的根目录)我不希望这样做。我希望joomla位于文件夹:panamainsider.com中。你能建议需要做一些更改,以便链接按照我网站的当前结构工作吗?