php - WordPress 不加载静态文件
问题描述
今天安装 PolyLang 插件后,我的 wordpress 网站出现问题:
err_too_many_redirects
所以我按照一些教程在 cPanel 中中场了 .htaccess 文件:
前:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
RewriteRule ^$ https://www.ohyanlawgroup.com/home/ [L,R=301]
RewriteEngine On
# RewriteCond %{HTTPS} off
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.ohyanlawgroup.com/$1 [R,L]
后:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule ^(.*)$ https://www.ohyanlawgroup.com/ [L,R=301]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.ohyanlawgroup.com/$1 [R,L]
现在 err_too_many_redirects 消失了。但是网站只能加载部分内容,似乎所有的静态文件都没有加载。
有朋友可以帮忙吗?
解决方案
推荐阅读
- php - Codeigniter - 显示有条件的数字
- dialogflow-es - 如何在 Dialogflow 中接收用户的数字序列?
- java - Spring Data Rest 持久化注解
- javascript - 错误:未找到 GoogleCardLayout2 的组件工厂
- reactjs - 动画事件反应原生
- asp.net - UserManager 无法更改所有用户帐户的 5%
- python-sphinx - Sphinx 静态文档生成器中的嵌入/包含?
- html - 一键激活两个标签
- angular - 覆盖我的可观察变量会杀死当前订阅者吗?
- python - PyCharm 中的一个项目的解释器问题(显然)