.htaccess - 将子文件夹重定向到索引
问题描述
我有以下网址
http://example.org/oldbutgold/1.html
http://example.org/oldbutgold/2.html
---
还有更多类似的情况,我想将这些链接重定向到:
我怎么能做到?
感谢广告
解决方案
刚刚找到解决方案
RedirectMatch 301 ^/oldbutgold(.*)$ http://example.org/goldies/
推荐阅读
- c++ - 为什么只有在模板推导时才能将左值绑定到通用引用?
- c# - xUnit 如何初始化与正在运行的理论\事实无关的数据?
- ios - 将多个数据附加到 URLRequest 的 httpbody
- java - 常量作为一个字节?
- sas - sas proc 制表(频率)
- mysql - 如何跨多个具有相同 ID 的 MySQL 表选择数据
- javascript - Antd DatePicker setValue 表单问题
- spring - 在 JPA / Hibernate 实体中使用保留关键字
- php - Laravel 背包过滤器预填充下拉列表
- jquery - 在活动状态和可用状态之间移动卡片