【发布时间】:2021-04-18 03:13:39
【问题描述】:
所以我有以下结构:
https://www.example.com
/index.html
/css
/images
/something
/else/with_subdirs
在每个文件夹中都可以有 index.html 文件
我要全部转换
http://www.example.com/dir1/subdir1?random_list_of_params
请求
https://wwww.example.com/index.html?d=dir1&sd=subdir1&random_list_of_params
如果 dir1 或 subdir1 不存在。
这应该是深达 3 层的圆顶
http://www.example.com/dir1/subdir1/subdir2/?random_list_of_params
https://wwww.example.com/index.html?d=dir1&sd=subdir1&sdd=subdir2&random_list_of_params
请注意 dir1、subdi1 和 subdir2 不同。
谢谢!
【问题讨论】:
标签: .htaccess redirect mod-rewrite url-rewriting friendly-url