私はこのようなウェブサイト構造を持っています:
/docs/one_of_the_resources/one-of-the-resources.html
/docs/a_complete_different_resource/a-complete-different-resource.html
URL内のすべてのサブフォルダーを取り除き、これを取得したい:
/one-of-the-resources.html
/a-complete-different-resource.html
サブフォルダーは影響を受けません。
/docs/one_of_the_resources/assets/*
フォルダー名は常に html ファイルと同じですが、ダッシュが下線に置き換えられ、もちろん接尾辞はありません。
私はgrunt-contrib-rewriteと grunt-connect を使用しています。
私の頭を包むことはできません。これは可能ですか?