Example 7: Marketing Keyword Redirection 编辑
The marketing department at Example Inc. wants to set up simplified URLs for certain predefined keyword searches on the company’s Web site. For these keywords, it wants to redefine the URL as shown below.
- External URL:
http://www.example.com/\<marketingkeyword\>
- Internal URL:
http://www.example.com/go/kwsearch.asp?keyword=\<marketingkeyword\>
To set up redirection for marketing keywords, you would create a rewrite action with the values in the following table.
Action Name | Type of Rewrite Action | Expression to choose target location | String expression for replacement text |
---|---|---|---|
Action-Rewrite-Modify_URL | INSERT_BEFORE | HTTP.REQ.URL.PATH.GET(1) | "”go/kwsearch.aspkeyword=”l” |
You would then create a rewrite policy with the values in the following table.
Policy Name | Action Name | Undefined Action | Expression |
---|---|---|---|
Policy-Rewrite-Modify_URL | Action-Rewrite-Modify_URL | NOREWRITE | HTTP.REQ.HOSTNAME.SERVER.EQ(“www.example.com”) |
Finally, you would bind the rewrite policy, assigning it a priority of 800. Unlike the previous rewrite policies, this policy should be the last to be applied to a request that matches its criteria. For this reason, Citrix ADC administrator sets its Goto Priority Expression to END.
Any request using a marketing keyword is redirected to the keyword search CGI page, whereupon a search is performed and all remaining policies are skipped.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论