Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 apache 中为我的虚拟主机做一个 AliasMatch。我想做这样的路径:
/文件夹1/文件夹2/文件夹3
指向
/folder1/folder2/somethingelse/folder3
但路径也可以是:
/文件夹1/文件夹2
然后应该指向:
/folder2/folder2/其他东西
所有子文件夹都有未知名称,它只是我知道名称的文件夹“somethingelse”。
对模式有什么建议吗?到目前为止我得到了这个;
[^/]*((/[^/]*)?)?(.*)
尝试这个 :
AliasMatch ^/([^/]+)/([^/]+) "/$1/$2/somethingelse" AliasMatch ^/([^/]+)/([^/]+)/([^/]+) "/$1/$2/somethingelse/$3"