ADC

将 Apache mod_rewrite 规则迁移到高级策略

Apache HTTP 服务器提供了一个名为 mod_rewrite 的引擎,用于重写 HTTP 请求 URL。如果将 mod_rewrite 规则从 Apache 迁移到 NetScaler,则可以提高后端服务器的性能。此外,由于 NetScaler 通常会对多个(有时是数千个)Web 服务器进行负载平衡,因此在将规则迁移到 NetScaler 后,您将拥有对这些规则的单点控制。

以下是 mod_rewrite 函数的示例,以及将这些函数转换为 NetScaler 上的重写和响应程序策略。

将 URL 变体转换为规范 URL

在某些 Web 服务器上,一个资源可以有多个 URL。尽管应使用和分发规范 URL,但其他 URL 可以作为快捷方式或内部 URL 存在。无论用于发出初始请求的 URL 是什么,您都可以确保用户看到规范 URL。

在以下示例中,URL /~user 被转换为 /u/user。

用于转换 URL 的 Apache mod_rewrite 解决方案

RewriteRule ^/~([^/]+)/?(.*) /u/$1/$2[R]
<!--NeedCopy-->

用于转换 URL 的 NetScaler 解决方案

add responder action act1 redirect '"/u/"+HTTP.REQ.URL.AFTER_STR("/~")'
add responder policy pol1 'HTTP.REQ.URL.STARTSWITH("/~") && HTTP.REQ.URL.LENGTH.GT(2)' act1
bind responder global pol1 100
<!--NeedCopy-->

将主机名变体转换为规范主机名

您可以强制使用特定的主机名访问站点。例如,您可以强制使用 www.example.com 而不是 example.com。

Apache mod_rewrite 解决方案,用于为在 80 以外的端口上运行的站点强制使用特定主机名


RewriteCond %{HTTP_HOST}   !^www.example.com
RewriteCond %{HTTP_HOST}   !^$
RewriteCond %{SERVER_PORT} !^80$
RewriteRule ^/(.*)         http://www.example.com:%{SERVER_PORT}/$1 [L,R]
<!--NeedCopy-->

Apache mod_rewrite 解决方案,用于为在端口 80 上运行的站点强制使用特定主机名


RewriteCond %{HTTP_HOST}   !^www.example.com
RewriteCond %{HTTP_HOST}   !^$
RewriteRule ^/(.*)         http://www.example.com/$1 [L,R]
<!--NeedCopy-->

NetScaler 解决方案,用于为在 80 以外的端口上运行的站点强制使用特定主机名


add responder action act1 redirect '"http://www.example.com:"+CLIENT.TCP.DSTPORT+HTTP.REQ.URL'
add responder policy pol1 '!HTTP.REQ.HOSTNAME.CONTAINS("www.example.com")&&!HTTP.REQ.HOSTNAME.EQ("")&&!HTTP.REQ.HOSTNAME.PORT.EQ(80)&&HTTP.REQ.HOSTNAME.CONTAINS("example.com")' act1
bind responder global pol1 100 END
<!--NeedCopy-->

NetScaler 解决方案,用于为在端口 80 上运行的站点强制执行特定主机名


add responder action act1 redirect '"http://www.example.com"+HTTP.REQ.URL'
add responder policy pol1  '!HTTP.REQ.HOSTNAME.CONTAINS("www.example.com")&&!HTTP.REQ.HOSTNAME.EQ("")&&HTTP.REQ.HOSTNAME.PORT.EQ(80)&&HTTP.REQ.HOSTNAME.CONTAINS("example.com")' act1
bind responder global  pol1 100 END
<!--NeedCopy-->

移动文档根目录

通常,Web 服务器的文档根目录基于 URL“/”。但是,文档根目录可以是任何目录。如果流量从顶级“/”目录更改为另一个目录,则可以将流量重定向到文档根目录。

在以下示例中,您将文档根目录从/更改为 /e/www。前两个示例只是用另一个字符串替换一个字符串。第三个示例更通用,因为它在替换根目录的同时保留了 URL 的其余部分(路径和查询字符串),例如,将 /example/file.html 重定向到 /e/www/example/file.html。

用于移动文档根目录的 Apache mod_rewrite 解决方案


RewriteEngine on
RewriteRule   ^/$  /e/www/  [R]
<!--NeedCopy-->

NetScaler 用于移动文档根目录的解决方案


add responder action act1 redirect '"/e/www/"'
add responder policy pol1 'HTTP.REQ.URL.EQ("/")' act1
bind responder global pol1 100
<!--NeedCopy-->

NetScaler 解决方案,用于移动文档根目录并将路径信息附加到请求


add responder action act1 redirect '"/e/www"+HTTP.REQ.URL'
add responder policy pol1 '!HTTP.REQ.URL.STARTSWITH("/e/www/")' act1
bind responder global pol1 100 END
<!--NeedCopy-->

将主目录移动到新的 Web 服务器

您可能希望将发送到 Web 服务器上主目录的请求重定向到其他 Web 服务器。例如,如果随着时间的推移,新的 Web 服务器正在取代旧的 Web 服务器,则在将主目录迁移到新位置时,需要将迁移的主目录的请求重定向到新的 Web 服务器。

在以下示例中,新 Web 服务器的主机名为 newserver。

用于重定向到另一台 Web 服务器的 Apache mod_rewrite 解决方案


RewriteRule   ^/(.+)  http://newserver/$1     [R,L]
<!--NeedCopy-->

用于重定向到另一台 Web 服务器的 NetScaler 解决方案(方法 1)


add responder  action act1 redirect '"http://newserver"+HTTP.REQ.URL'
add responder policy pol1 'HTTP.REQ.URL.REGEX_MATCH(re#^/(.+)#)'   act1
bind responder global pol1 100 END
<!--NeedCopy-->

用于重定向到另一台 Web 服务器的 NetScaler 解决方案(方法 2)


add responder  action act1 redirect '"http://newserver"+HTTP.REQ.URL'
add responder policy pol1 'HTTP.REQ.URL.LENGTH.GT(1)' act1
bind responder global pol1 100 END
<!--NeedCopy-->

使用结构化主目录

通常,拥有数千名用户的站点具有结构化的主目录布局。例如,每个主目录都可能位于使用用户名的第一个字符命名的子目录下。例如,jsmith (/~jsmith/anypath) 的主目录可能是 /home /j/smith/.www/anypath,而 rvalveti (/~rvalveti/anypath) 的主目录可能是 /家/r/rvalveti/.www/anypath。

以下示例将请求重定向到主目录。

适用于结构化主目录的 Apache mod_rewrite 解决方案

RewriteRule   ^/~(([a-z])[a-z0-9]+)(.*)  /home/$2/$1/.www$3
<!--NeedCopy-->

用于结构化主目录的 NetScaler 解决方案

用于结构化主目录的 NetScaler 解决方案


add rewrite action act1 replace 'HTTP.REQ.URL'  '"/home/"+ HTTP.REQ.URL.AFTER_STR("~").PREFIX(1)+"/"+ HTTP.REQ.URL.AFTER_STR("~").BEFORE_STR("/")+"/.www"+HTTP.REQ.URL.SKIP('/',1)'
add rewrite policy pol1  'HTTP.REQ.URL.PATH.STARTSWITH("/~")' act1
bind rewrite global pol1 100

<!--NeedCopy-->

将无效的 URL 重定向到其他 Web 服务器

如果 URL 无效,则应将其重定向到另一台 Web 服务器。例如,如果在 URL 中命名的服务器上不存在以 URL 命名的文件,则应重定向到另一台 Web 服务器。

在 Apache 上,您可以使用 mod_rewrite 执行这项检查。在 NetScaler 上,HTTP 标注可以通过在服务器上运行脚本来检查服务器上的文件。在以下 NetScaler 示例中,名为 file_check.cgi 的脚本处理 URL 并使用此信息检查服务器上是否存在目标文件。该脚本返回 TRUE 或 FALSE,NetScaler 使用脚本返回的值来验证策略。

除了执行重定向外,NetScaler 还可以添加自定义标头,或者像第二个 NetScaler 示例一样,它可以在响应正文中添加文本。

如果 URL 错误,Apache mod_rewrite 用于重定向的解决方案


RewriteCond   /your/docroot/%{REQUEST_FILENAME} !-f
RewriteRule   ^(.+)      http://webserverB.com/$1 [R]

<!--NeedCopy-->

如果 URL 错误,NetScaler 解决方案可进行重定向(方法 1)


add HTTPCallout Call
set policy httpCallout Call -IPAddress 10.102.59.101 -port 80 -hostExpr '"10.102.59.101"' -returnType BOOL -ResultExpr 'HTTP.RES.BODY(100).CONTAINS("True")'  -urlStemExpr '"/cgi-bin/file_check.cgi"'   -parameters query=http.req.url.path -headers Name("ddd")
add responder action act1 redirect '"http://webserverB.com"+HTTP.REQ.URL'
add responder policy pol1 '!HTTP.REQ.HEADER("Name").EXISTS  &&  !SYS.HTTP_CALLOUT(call)' act1
bind responder global pol1 100

<!--NeedCopy-->

如果 URL 错误,NetScaler 解决方案可进行重定向(方法 2)


add HTTPCallout Call
set policy httpCallout Call -IPAddress 10.102.59.101 -port 80 -hostExpr '"10.102.59.101"' -returnType BOOL -ResultExpr 'HTTP.RES.BODY(100).CONTAINS("True")'  -urlStemExpr '"/cgi-bin/file_check.cgi"'   -parameters query=http.req.url.path -headers Name("ddd")
add responder  action act1 respondwith  '"HTTP/1.1 302 Moved Temporarily\r\nLocation: http://webserverB.com"+HTTP.REQ.URL+"\r\n\r\nHTTPCallout Used"'
add responder policy pol1 '!HTTP.REQ.HEADER("Name").EXISTS  &&  !SYS.HTTP_CALLOUT(call)' act1
bind responder global pol1 100

<!--NeedCopy-->

根据时间重写 URL

您可以根据时间重写 URL。以下示例将对 example.html 的请求更改为例如 .day.html 或示例 .night.html,具体取决于一天中的时间。

Apache mod_rewrite 基于时间重写 URL 的解决方案


RewriteCond   %{TIME_HOUR}%{TIME_MIN} >0700
RewriteCond   %{TIME_HOUR}%{TIME_MIN} <1900
RewriteRule   ^example.html$ example.day.html [L]
RewriteRule   ^example.html$ example.night.html

<!--NeedCopy-->

NetScaler 解决方案,用于根据时间重写 URL


add rewrite action act1 insert_before 'HTTP.REQ.URL.PATH.SUFFIX('.',0)' '"day."'
add rewrite action act2  insert_before 'HTTP.REQ.URL.PATH.SUFFIX('.',0)' '"night."'
add rewrite  policy pol1 'SYS.TIME.WITHIN(LOCAL 07h 00m,LOCAL 18h 59m)' act1
add rewrite policy pol2 'true'  act2
bind rewrite global pol1 101
bind rewrite global pol2 102

<!--NeedCopy-->

重定向到新文件名(用户不可见)

如果重命名网页,则可以继续支持旧 URL 以实现向后兼容性,同时防止用户识别该页面已重命名。

在以下示例的前两个中,基目录是 /~quux/。第三个示例可容纳任何基本目录以及 URL 中存在的查询字符串。

Apache mod_rewrite 解决方案,用于在固定位置管理文件名更改


RewriteEngine  on
RewriteBase    /~quux/
RewriteRule    ^foo.html$  bar.html

<!--NeedCopy-->

NetScaler 解决方案,用于在固定位置管理文件名更改


add rewrite action act1 replace 'HTTP.REQ.URL.AFTER_STR("/~quux").SUBSTR("foo.html")' '"bar.html"'
add rewrite policy pol1 'HTTP.REQ.URL.ENDSWITH("/~quux/foo.html")' act1
bind rewrite global pol1 100

<!--NeedCopy-->

NetScaler 解决方案,用于管理文件名更改,而不考虑 URL 中的基目录或查询字符串


add rewrite action act1 replace 'HTTP.REQ.URL.PATH.SUFFIX('/',0)' '"bar.html"'
Add rewrite policy pol1 'HTTP.REQ.URL.PATH.CONTAINS("foo.html")' act1
Bind rewrite global pol1 100

<!--NeedCopy-->

重定向到新文件名(用户可见的 URL)

如果重命名网页,则可能需要继续支持旧 URL 以实现向后兼容性,并允许用户通过更改浏览器中显示的 URL 来查看该页面已被重命名。

在以下示例的前两个中,当基目录为 /~quux/ 时,会发生重定向。第三个示例可容纳任何基本目录以及 URL 中存在的查询字符串。

Apache mod_rewrite 用于更改浏览器中显示的文件名和 URL 的解决方案


RewriteEngine on
RewriteBase    /~quux/
RewriteRule    ^old.html$ new.html  [R]

<!--NeedCopy-->

NetScaler 解决方案,用于更改浏览器中显示的文件名和 URL


add responder action act1 redirect 'HTTP.REQ.URL.BEFORE_STR("foo.html")+"new.html"'
add responder policy pol1 'HTTP.REQ.URL.ENDSWITH("/~quux/old.html")' act1
bind responder global pol1 100

<!--NeedCopy-->

NetScaler 解决方案,用于更改浏览器中显示的文件名和 URL,而不考虑 URL 中的基本目录或查询字符串


add responder action act1 redirect 'HTTP.REQ.URL.PATH.BEFORE_STR("old.html")+"new.html"+HTTP.REQ.URL.AFTER_STR("old.html")'
add responder policy pol1 'HTTP.REQ.URL.PATH.CONTAINS("old.html")' act1
bind responder global pol1 100

<!--NeedCopy-->

容纳依赖于浏览器的内容

为了适应特定于浏览器的限制(至少对于重要的顶级页面而言),有时需要对浏览器类型和版本设置限制。例如,您可能需要为最新的 Netscape 变体设置最高版本,为 Lynx 浏览器设置最低版本,为所有其他版本设置平均功能版本。

以下示例对 HTTP 标头“用户代理”起作用,因此,如果此标头以“Mozilla/3”开头,则页面 MyPage.html 将被重写为 myPage.ns.HTML。如果浏览器是“Lynx”或“Mozilla”版本 1 或 2,则该 URL 将变为 myPage.20.html。所有其他浏览器都会收到页面 mypage.32.html。

适用于浏览器特定设置的 Apache mod_rewrite 解决方案


RewriteCond %{HTTP_USER_AGENT}  ^Mozilla/3.*
RewriteRule ^MyPage.html$ MyPage.NS.html [L]
RewriteCond %{HTTP_USER_AGENT}  ^Lynx/.* [OR]
RewriteCond %{HTTP_USER_AGENT}  ^Mozilla/[12].*
RewriteRule ^MyPage.html$ MyPage.20.html [L]
RewriteRule ^fMyPage.html$ MyPage.32.html [L]
NetScaler solution for browser-specific settings
add patset pat1
bind patset pat1 Mozilla/1
bind Patset pat1 Mozilla/2
bind patset pat1 Lynx
bind Patset pat1 Mozilla/3
add rewrite action act1 insert_before 'HTTP.REQ.URL.SUFFIX' '"NS."'
add rewrite action act2 insert_before 'HTTP.REQ.URL.SUFFIX' '"20."'
add rewrite action act3 insert_before 'HTTP.REQ.URL.SUFFIX' '"32."'
add rewrite policy pol1 'HTTP.REQ.HEADER("User-Agent").STARTSWITH_INDEX("pat1").EQ(4)' act1
add rewrite policy pol2 'HTTP.REQ.HEADER("User-Agent").STARTSWITH_INDEX("pat1").BETWEEN(1,3)' act2
add rewrite policy pol3 '!HTTP.REQ.HEADER("User-Agent").STARTSWITH_ANY("pat1")' act3
bind rewrite global pol1 101 END
bind rewrite global pol2 102 END
bind rewrite global pol3 103 END

<!--NeedCopy-->

阻止机器人访问

您可以阻止机器人从特定目录或一组目录中检索页面,以减轻进出这些目录的流量。您可以根据特定位置限制访问,也可以根据 User-Agent HTTP 标头中的信息阻止请求。

在以下示例中,要阻止的 Web 位置是 /~quux/foo/arc/,要阻止的 IP 地址是 123.45.67.8 和 123.45.67.9,机器人的名称是 NameOfBadRobot。

Apache mod_rewrite 用于阻塞路径和用户代理标头的解决方案


RewriteCond %{HTTP_USER_AGENT}   ^NameOfBadRobot.*
RewriteCond %{REMOTE_ADDR}       ^123.45.67.[8-9]$
RewriteRule ^/~quux/foo/arc/.+   -   [F]

<!--NeedCopy-->

NetScaler 解决方案,用于阻止路径和用户代理标头


add responder action act1 respondwith '"HTTP/1.1 403 Forbidden\r\n\r\n"'
add responder policy pol1 'HTTP.REQ.HEADER("User_Agent").STARTSWITH("NameOfBadRobot")&&CLIENT.IP.SRC.EQ(123.45.67.8)&&CLIENT.IP.SRC.EQ(123.45.67.9) && HTTP.REQ.URL.STARTSWITH("/~quux/foo/arc")' act1
bind responder global pol1 100

<!--NeedCopy-->

阻止访问内联图像

如果您发现人们经常前往您的服务器复制内联图形以供自己使用(并产生不必要的流量),则可能需要限制浏览器发送 HTTP Referer 标头的能力。

在以下示例中,图形位于 示例中。

用于阻止访问内联映像的 Apache mod_rewrite 解决方案


RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.quux-corp.de/~quux/.\*$
RewriteRule .\*.gif$ - [F]

<!--NeedCopy-->

NetScaler 解决方案,用于阻止对内联映像的访问


add patset pat1
bind patset pat1 .gif
bind patset pat1 .jpeg
add responder action act1 respondwith '"HTTP/1.1 403 Forbidden\r\n\r\n"'
add responder policy pol1 '!HTTP.REQ.HEADER("Referer").EQ("") && !HTTP.REQ.HEADER("Referer").STARTSWITH("http://www.quux-corp.de/~quux/")&&HTTP.REQ.URL.ENDSWITH_ANY("pat1")' act1
bind responder global pol1 100

<!--NeedCopy-->

创建无扩展名链接

为了防止用户知道服务器端的应用程序或脚本详细信息,您可以向用户隐藏文件扩展名。为此,您可能需要支持无扩展名链接。您可以通过使用重写规则向所有请求添加扩展或有选择地向请求添加扩展来实现此行为。

以下示例中的前两个示例显示向所有请求 URL 添加扩展名。在最后一个示例中,添加了两个文件扩展名之一。请注意,在最后一个示例中,mod_rewrite 模块可以很容易地找到文件扩展名,因为该模块驻留在 Web 服务器上。相比之下,NetScaler 必须调用 HTTP 标注来检查 Web 服务器上请求的文件的扩展名。根据标注响应,NetScaler 将 .html 或 .php 扩展名添加到请求 URL 中。

注意

在第二个 NetScaler 示例中,HTTP 标注用于查询服务器上托管的名为 file_check.cgi 的脚本。此脚本检查标注中提供的参数是否为有效的文件名。

用于向所有请求添加 .php 扩展名的 Apache mod_rewrite 解决方案


RewriteRule ^/?([a-z]+)$ $1.php [L]

<!--NeedCopy-->

NetScaler 策略,用于向所有请求添加 .php 扩展名


add rewrite action act1 insert_after 'HTTP.REQ.URL' '".php"'
add rewrite policy pol1 'HTTP.REQ.URL.PATH.REGEX_MATCH(re#^/([a-z]+)$#)' act1
bind rewrite global pol1 100
<!--NeedCopy-->

用于向请求添加 .html 或 .php 扩展名的 Apache mod_rewrite 解决方案


RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^/?([a-zA-Z0-9]+)$ $1.php [L]
RewriteCond %{REQUEST_FILENAME}.html –f
RewriteRule ^/?([a-zA-Z0-9]+)$ $1.html [L]
<!--NeedCopy-->

NetScaler 策略,用于向请求中添加 .html 或 .php 扩展名


add HTTPCallout Call_html
add HTTPCallout Call_php
set policy httpCallout Call_html -IPAddress 10.102.59.101 -port 80 -hostExpr '"10.102.59.101"' -returnType BOOL -ResultExpr 'HTTP.RES.BODY(100).CONTAINS("True")'  -urlStemExpr '"/cgi-bin/file_check.cgi"'   -parameters query=http.req.url+".html"
set policy httpCallout Call_php -IPAddress 10.102.59.101 -port 80 -hostExpr '"10.102.59.101"' -returnType BOOL -ResultExpr 'HTTP.RES.BODY(100).CONTAINS("True")'  -urlStemExpr '"/cgi-bin/file_check.cgi"' -parameters query=http.req.url+".php"
add patset pat1
bind patset pat1 .html
bind patset pat1 .php
bind patset pat1 .asp
bind patset pat1 .cgi
add rewrite  action act1 insert_after 'HTTP.REQ.URL.PATH'  '".html"'
add rewrite  action act2 insert_after "HTTP.REQ.URL.PATH"  '".php"'
add rewrite policy pol1 '!HTTP.REQ.URL.CONTAINS_ANY("pat1") && SYS.HTTP_CALLOUT(Call_html)' act1
add rewrite policy pol2 '!HTTP.REQ.URL.CONTAINS_ANY("pat1") && SYS.HTTP_CALLOUT(Call_php)' act2
bind rewrite global pol1 100 END
bind rewrite global pol2 101 END

<!--NeedCopy-->

将工作 URI 重定向为新格式

假设您有一组类似于以下内容的有效 URL:


/index.php?id=nnnn

<!--NeedCopy-->

要将这些 URL 更改为 /nnnn 并确保搜索引擎将其索引更新为新的 URI 格式,您需要执行以下操作:

  • 将旧的 URI 重定向到新的 URI,以便搜索引擎更新其索引。
  • 将新 URI 重写回旧 URI,以便 index.php 脚本正常运行。

为此,您可以将标记代码插入查询字符串中(确保访问者看不到标记代码),然后删除 index.php 脚本的标记代码。

仅当查询字符串中不存在标记时,以下示例才会从旧链接重定向到新格式。使用新格式的链接将重写回旧格式,然后将标记添加到查询字符串中。

Apache mod_rewrite 解决方案


RewriteCond %{QUERY_STRING} !marker
RewriteCond %{QUERY_STRING} id=([-a-zA-Z0-9_+]+)
RewriteRule ^/?index.php$ %1? [R,L]
RewriteRule ^/?([-a-zA-Z0-9_+]+)$  index.php?marker&id=$1 [L]
NetScaler solution
add responder action act_redirect redirect 'HTTP.REQ.URL.PATH.BEFORE_STR("index.php")+HTTP.REQ.URL.QUERY.VALUE("id")'
add responder policy pol_redirect '!HTTP.REQ.URL.QUERY.CONTAINS("marker")&& HTTP.REQ.URL.QUERY.VALUE("id").REGEX_MATCH(re/[-a-zA-Z0-9_+]+/) && HTTP.REQ.URL.PATH.CONTAINS("index.php")' act_redirect
bind responder global pol_redirect 100 END
add rewrite action act1 replace 'HTTP.REQ.URL.PATH.SUFFIX('/',0)' '"index.phpmarker&id="+HTTP.REQ.URL.PATH.SUFFIX('/',0)'
add rewrite policy pol1 '!HTTP.REQ.URL.QUERY.CONTAINS("marker")'  act1
bind rewrite global pol1 100 END

<!--NeedCopy-->

确保所选页面使用安全服务器

为确保所选网页仅使用安全服务器,可以使用以下 Apache mod_rewrite 代码或 NetScaler 响应程序策略。

Apache mod_rewrite 解决方案


RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/?(page1|page2|page3|page4|page5)$  https://www.example.com/%1 [R,L]

<!--NeedCopy-->

NetScaler 解决方案使用正则表达式


add responder action res_redirect redirect  '"https://www.example.com"+HTTP.REQ.URL'
add responder policy pol_redirect '!CLIENT.TCP.DSTPORT.EQ(443)&&HTTP.REQ.URL.REGEX_MATCH(re/page[1-5]/)'  res_redirect
bind responder global pol_redirect 100 END

<!--NeedCopy-->

使用模式集的 NetScaler 解决方案


add patset pat1
bind patset pat1 page1
bind patset pat1 page2
bind patset pat1 page3
bind patset pat1 page4
bind patset pat1 page5
add responder action res_redirect redirect  '"https://www.example.com"+HTTP.REQ.URL'
add responder policy pol_redirect '!CLIENT.TCP.DSTPORT.EQ(443)&&HTTP.REQ.URL.CONTAINS_ANY("pat1")'  res_redirect
bind responder global pol_redirect 100 END

<!--NeedCopy-->
将 Apache mod_rewrite 规则迁移到高级策略

在本文中