Forum Discussion

Misty_Spillers's avatar
Icon for Nimbostratus rankNimbostratus
Feb 28, 2012

Redirecting 404 to a friendly page by uri

I have done lots of searching and have even come across posts of exactly what I want to do but is doesn't seem to work for me. I'm wondering if I'm running into a problem because I'm running 9.4.4 but it seems simple enough.

Our websites are laid out like this

Agency1 is getting a complete makeover and I want to redirect 404's just for them to their own page.

Why doesn't this rule work? (the 404 pages still show)

     set uri [string tolower [HTTP::uri]]

     if { [HTTP::status] == 404 and $uri eq "/agency1"} {
      HTTP::redirect ""

My only guess is that it never equals "agency1" if I remove the that part it redirect all 404's from which makes sense.

Thanks in advance,


15 Replies