Citrix Systems 9.2 Benutzerhandbuch

Seite von 302
266
Citrix NetScaler Policy Configuration and Reference Guide
Apache mod_rewrite solution for changing the file name and the URL 
displayed in the browser
RewriteEngine on
RewriteBase    /~quux/
RewriteRule    ^old\.html$ new.html  [R]
NetScaler solution for changing the file name and the URL displayed in the 
browser
add responder action act1 redirect 
'HTTP.REQ.URL.BEFORE_STR("foo.html")+"new.html"' -bypassSafetyCheck 
yes
add responder policy pol1 'HTTP.REQ.URL.ENDSWITH("/~quux/
old.html")' act1
bind responder global pol1 100
NetScaler solution for changing the file name and the URL displayed in the 
browser regardless of the base directory or query strings in the URL
add responder action act1 redirect 
'HTTP.REQ.URL.PATH.BEFORE_STR("old.html")+"new.html"+HTTP.REQ.URL.A
FTER_STR("old.html")' -bypassSafetyCheck yes
add responder policy pol1 'HTTP.REQ.URL.PATH.CONTAINS("old.html")' 
act1
bind responder global pol1 100
Accommodating Browser Dependent Content
To accommodate browser-specific limitations—at least for important top-level 
pages—it is sometimes necessary to set restrictions on the browser type and 
version. For example, you might want to set a maximum version for the latest 
Netscape variants, a minimum version for Lynx browsers, and an average feature 
version for all others.
The following examples act on the HTTP header "User-Agent", such that if this 
header begins with "Mozilla/3", the page MyPage.html is rewritten to 
MyPage.NS.html. If the browser is "Lynx" or "Mozilla" version 1 or 2, the URL 
becomes MyPage.20.html. All other browsers receive page MyPage.32.html. 
Apache mod_rewrite solution for browser-specific settings
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].*