alinayesina_102
Mar 13, 2009Nimbostratus
Responce URI Masking/Hiding
We would like to consult on the possibility of performing a URL rewrite with the use of an iRule for domain.com. it’s not a good practice for our homepage to show as http://www.domain.com/home/default.htm, the ideal way is to only show www.domain.com which is good for search engine crawlers and improves our search rankings.
Would something like this work?
when HTTP_RESPONSE {
if { [HTTP::status] starts_with "3" } {
set origRedir [HTTP::header Location]
set newRedir [string map {"/home/default.htm" "" } [HTTP::header Location]]
HTTP::header replace Location $newRedir
log local0. "Original redirect: $origRedir."
log local0. "Rewritten redirect $newRedir"
}
}