.htaccess - 试图在 .htaccess 中找出这个重定向
问题描述
这是我正在处理的网站之一的 .htaccess 文件。我的 apache 虚拟主机设置为自动将 http 重定向到 https。当我转到我的http://www版本时遇到了问题。它在两者之间添加了 index.php。你能看出这里有什么问题吗?
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{THE_REQUEST} ^.*/\.
RewriteRule ^(.*)$ - [R=404]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
ErrorDocument 404 /404.html
解决方案
推荐阅读
- reactjs - 如何使具有多个对象的对象成为状态数组?
- c# - The given key was not present in the dictionary exception
- java - Bottomnavigationbar 无法将可检查设置为 false,但 true 可以正常工作
- r - 在R中解码西里尔字符串
- c++ - Issues with C++ bitfields
- regex - regex string which will capture a namespace and replace as required
- php - 我希望模式以正确的ID打开,即在foreach中
- r - 在克里金法(R)中使用 grid.expand 函数时,在“by”参数中出现错误符号
- reactjs - 如何在渲染另一个组件之前运行效果对组件的清理?
- c - 制作棕褐色滤镜时,弹出错误信息,是什么意思?C