Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Regex Azure CDN规则引擎删除.html扩展名_Regex_Azure_Azure Cdn - Fatal编程技术网

Regex Azure CDN规则引擎删除.html扩展名

Regex Azure CDN规则引擎删除.html扩展名,regex,azure,azure-cdn,Regex,Azure,Azure Cdn,我在Azure Blob上运行一个静态网站,并使用CDN premium。我正在尝试让我的所有页面在URL中删除.html扩展名 我已经阅读了很多关于如何通过regex删除上的.html扩展名的指南,但我不能让它对所有页面都起作用。我在网上找到的所有指南似乎都只适用于index.html和链接到的图像,它们在源代码中总是显示一个/,而在描述中却没有这样写 适当资本化/清理。 rule IF Always Feature URL Rewrite - source ((?:[^\?]*/)?)($|

我在Azure Blob上运行一个静态网站,并使用CDN premium。我正在尝试让我的所有页面在URL中删除.html扩展名

我已经阅读了很多关于如何通过regex删除上的.html扩展名的指南,但我不能让它对所有页面都起作用。我在网上找到的所有指南似乎都只适用于index.html和链接到的图像,它们在源代码中总是显示一个
/
,而在描述中却没有这样写


适当资本化/清理。
rule IF Always
Feature
URL Rewrite - source ((?:[^\?]*/)?)($|\?.*) destination $1index.html$2
URL Rewrite - source ((?:[^\?]*/)?[^\?/.]+)($|\?.*) destination $1.html$2