【问题标题】:.htaccess redirection error in Joomla siteJoomla 网站中的 .htaccess 重定向错误
【发布时间】:2020-04-09 14:19:33
【问题描述】:

我的 Joomla 网站在很长一段时间内都可以正常工作,但它突然停止工作,就像它只显示 index.html 页面一样,它没有重定向到我的 htaccess 在下面发布的其他页面。

##### RewriteEngine enabled - BEGIN
RewriteEngine On
##### RewriteEngine enabled - END

## Send ETag (selected method: )
##### Rewrite rules to block out some common exploits -- BEGIN
RewriteCond %{QUERY_STRING} proc/self/environ [OR]
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
RewriteCond %{QUERY_STRING} base64_(en|de)code\(.*\) [OR]
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule .* index.php [F]
##### Rewrite rules to block out some common exploits -- END
##### Advanced server protection rules exceptions -- BEGIN
##### Advanced server protection rules exceptions -- END

##### Advanced server protection -- BEGIN

##### Advanced server protection -- END

##### Joomla! core SEF Section -- BEGIN
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]
##### Joomla! core SEF Section -- END

正如某些来源所建议的,我已将文件和文件夹的权限设置为 755 和 644,但在我的实时应用程序中仍然存在此问题,任何建议都将不胜感激。

【问题讨论】:

    标签: php .htaccess joomla


    【解决方案1】:

    需要加载index.php 才能运行Joomla。

    如果正在加载 index.html,这可能与您的主机配置有关。

    如果您不希望加载 index.html 文件,您可以重命名该文件,或者您可以将指令添加到您的 .htaccess 文件,如下所示:

    DirectoryIndex index.php index.html
    

    index.php 将优先于index.html 加载。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-04-07
      • 1970-01-01
      • 2012-11-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-05
      相关资源
      最近更新 更多