DenisG_22372
Mar 25, 2012Historic F5 Account
HTTP rewriting problems, realtive path hell.
I need some rewriting rules so that if a user enters in just http://server it will redirect to http://server/application/application, with images coming from http://server/application and spellcheck from http://server/spellcheck.
unfortunately every call coming in is getting the /application appended so the spell check doesn't work. Logic is not working today.
I thought I would just use an if / else, but the spellcheck is killing that option. Here is what I have so far:
when HTTP_REQUEST {
set host [string tolower [HTTP::host]]
set path [HTTP::path]
if { ( $host ne "server.domain.com" ) } {
HTTP::redirect "
server.domain.com $path"
}
if { ([HTTP::uri] equals "/" or [HTTP::uri] equals "/application" )} {
HTTP::uri /application/application
}
this is the broken bits
if {([HTTP::uri] starts_with "/jspellhtml2k4")} {
HTTP::uri /spellcheck[HTTP::uri]
}
if { !([HTTP::uri] starts_with "/application")} {
HTTP::uri /application[HTTP::uri]
}
}