-
AppExpert Applications and Templates
-
Configure application authentication, authorization, and auditing
-
-
Advanced Policy Expressions: Working with Dates, Times, and Numbers
-
Advanced Policy Expressions: Parsing HTTP, TCP, and UDP Data
-
Advanced Policy Expressions: IP and MAC Addresses, Throughput, VLAN IDs
-
-
-
-
Rewrite Action and Policy Examples
-
Example 6: Migrating Apache Rewrite Module Rules
This content has been machine translated dynamically.
Dieser Inhalt ist eine maschinelle Übersetzung, die dynamisch erstellt wurde. (Haftungsausschluss)
Cet article a été traduit automatiquement de manière dynamique. (Clause de non responsabilité)
Este artículo lo ha traducido una máquina de forma dinámica. (Aviso legal)
此内容已经过机器动态翻译。 放弃
このコンテンツは動的に機械翻訳されています。免責事項
이 콘텐츠는 동적으로 기계 번역되었습니다. 책임 부인
Este texto foi traduzido automaticamente. (Aviso legal)
Questo contenuto è stato tradotto dinamicamente con traduzione automatica.(Esclusione di responsabilità))
This article has been machine translated.
Dieser Artikel wurde maschinell übersetzt. (Haftungsausschluss)
Ce article a été traduit automatiquement. (Clause de non responsabilité)
Este artículo ha sido traducido automáticamente. (Aviso legal)
この記事は機械翻訳されています.免責事項
이 기사는 기계 번역되었습니다.책임 부인
Este artigo foi traduzido automaticamente.(Aviso legal)
这篇文章已经过机器翻译.放弃
Questo articolo è stato tradotto automaticamente.(Esclusione di responsabilità))
Translation failed!
Example 6: Migrating Apache Rewrite Module Rules
Example Inc., is currently using the Apache rewrite module to process search requests sent to its Web servers and redirect those requests to the appropriate server on the basis of information in the request URL. Example Inc. wants to simplify its setup by migrating these rules onto the Citrix ADC platform.
Several Apache rewrite rules that Example currently uses are shown below. These rules redirect search requests to a special results page if they do not have a SiteID string or if they have a SiteID string equal to zero (0), or to the standard results page if these conditions do not apply.
The following are the current Apache rewrite rules:
- RewriteCond %{REQUEST_FILENAME} ^/search$ [NC]
- RewriteCond %{QUERY_STRING} !SiteId= [OR]
- RewriteCond %{QUERY_STRING} SiteId=0
- RewriteCond %{QUERY_STRING} CallName=DisplayResults [NC]
- RewriteRule ^.*$ /results2.html [P,L]
- RewriteCond %{REQUEST_FILENAME} ^/search$ [NC]
- RewriteCond %{QUERY_STRING} CallName=DisplayResults [NC]
- <RewriteRule ^.*$ /results.html [P,L]
To implement these Apache rewrite rules on the Citrix ADC, you would create rewrite actions with the values in the following tables.
Action Name | Type of Rewrite Action | Expression to choose target reference | String expression for replacement text |
---|---|---|---|
Action-Rewrite-Display_Results_NulSiteID | REPLACE | HTTP.REQ.URL | “/results2.html” |
Action-Rewrite-Display_Results | REPLACE | HTTP.REQ.URL | “/results2.html” |
You would then create rewrite policies with the values as shown in the tables below.
Policy Name | Action Name | Undefined Action | Expression | |||
---|---|---|---|---|---|---|
Policy-Rewrite-Display_Results_NulSiteID | Action-Rewrite-Display_Results_NulSiteID | NOREWRITE | HTTP.REQ.URL.PATH.SET_TEXT_MODE(IGNORECASE).EQ(“/search”) && (!HTTP.REQ.URL.QUERY.CONTAINS(“SiteId=”) | HTTP.REQ.URL.QUERY.CONTAINS(“SiteId=0”) | ||
Policy-Rewrite-Display_Results | Action-Rewrite-Display_Results | NOREWRITE | HTTP.REQ.URL.PATH.SET_TEXT_MODE(IGNORECASE).EQ(“/search”) | HTTP.REQ.URL.QUERY.SET_TEXT_MODE(IGNORECASE).CONTAINS(“CallName=DisplayResults”)) |
Finally, you would bind the rewrite policies, assigning the first a priority of 600 and the second a priority of 700, and then set the goto expression to NEXT for both bindings.
The Citrix ADC now handles these search requests exactly as the Web server did before the Apache rewrite module rules were migrated.
Share
Share
In this article
This Preview product documentation is Cloud Software Group Confidential.
You agree to hold this documentation confidential pursuant to the terms of your Cloud Software Group Beta/Tech Preview Agreement.
The development, release and timing of any features or functionality described in the Preview documentation remains at our sole discretion and are subject to change without notice or consultation.
The documentation is for informational purposes only and is not a commitment, promise or legal obligation to deliver any material, code or functionality and should not be relied upon in making Cloud Software Group product purchase decisions.
If you do not agree, select I DO NOT AGREE to exit.