wordpress - .htaccess 重写代码阻止我编辑 wp 页面
问题描述
我的 .htaccess 包含以下代码,该代码不允许我编辑我的 wordpress 网站页面。
`<IfModule mod_rewrite.c>`
`RewriteEngine On`
`RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]`
`RewriteBase /`
# Force Trailing Slash
`RewriteCond %{REQUEST_FILENAME} !-f`
`RewriteCond %{REQUEST_URI} ^(.*)[^/]{1}$`
`RewriteRule (.*) $1/ [L,R=301]`
# Rewrite HTTP to HTTPS
`RewriteCond %{HTTPS} !=on`
`RewriteRule (.*) https://example.com/$1 [L,R=301]`
`RewriteRule ^index\.php$ - [L]`
`RewriteCond %{REQUEST_FILENAME} !-f`
`RewriteCond %{REQUEST_FILENAME} !-d`
`RewriteRule . /index.php [L]`
`</IfModule>`
# END WordPress
`RewriteEngine On`
`RewriteCond %{HTTPS} off [OR]`
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php73” package as the default “PHP” programming language.
`<IfModule mime_module>`
`AddHandler application/x-httpd-ea-php73 .php .php7 .phtml`
`</IfModule>`
# php -- END cPanel-generated handler, do not edit
我注意到,在我删除 #Force Trailing Slash 和 #Rewrite HTTP to HTTPS 的代码并保存 .htaccess 文件后,我可以编辑我的 wp 页面。但我不想删除这些代码,因为它会强制整个站点使用 https 并在末尾使用斜杠。
请有人建议我最好的选择。
解决方案
推荐阅读
- php - 使用 laravel 检索 eloquent 关系
- spfx - 如何在 SPFx 中使用 pageContext?
- java - Maven 依赖项未安装在自定义 jar 文件中
- java - 无法导入“import com.google.firebase.firestore.MetadataChanges”
- generics - 在 Kotlin 运行时获取泛型类型
- r - 如何替换由列表组成的数据框中的所有 NULL 值?
- angular - 如何设计http请求服务?我究竟做错了什么?
- jestjs - 升级 Jest 后运行测试时出错
- jmeter - 使用 JMeter 的动态请求
- c++ - 调用 C++ 基方法而不是派生方法