2016-10-06 54 views

回答

1

这通常是一个不好的做法,要求与链接到外部网站使用的重要信息的问题。

至于你的问题,你可以使用或不使用依赖于外部串引号转义:

# don't escape 
block: | 
     RewriteCond %{HTTP_HOST} ={{ url | regex_replace('(?:https?://)?([^/:]+)?.*', '\1') }} 

# escape 
block: "RewriteCond %{HTTP_HOST} ={{ url | regex_replace('(?:https?://)?([^/:]+)?.*', '\\1') }}" 
相关问题