.htaccess - index.php 在 htaccess 中根目录
问题描述
这是什么意思?我正在尝试从 URL 中删除 index.php 并指向根目录。例如, https://www.example.com/index.php重定向到https://www.example.com/ 下面的解决方案工作得很好。但是,我不清楚 RewriteCond 行中使用的 HTTP/。它有什么作用?有人可以解释一下吗?
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ https://www.aviatrix.com/$1 [R=301,L]
解决方案
推荐阅读
- c# - 按货币代码设置列货币格式
- javascript - 删除表行时保留语义 UI 下拉值
- python - 从列表中找到两个加起来为特定数字的数字
- android - wrap_content 中的多个 SwipeRefreshLayout 和 RecyclerView
- php - CodeIgniter 选择仅将第一个值传递给 PHP 的选项
- java - 带有 EclipseLink MOXy 和外部映射文档的 JAX-WS 和 JAX-RS
- c# - 如何获取程序集的命名空间而不是其依赖项?
- orbeon - 在 Orbeon XBL 组件中验证数据
- sql - BigQuery 会话和命中级别的理解
- javascript - materialize collapsible:如何确定哪个部分是打开的?