Thanks for your help guys this is what I used in the end
when HTTP_REQUEST {
log local0. "\HTTP::host\]\[HTTP::uri\]: [string tolower [HTTP::host]][string tolower [HTTP::uri]]"
switch -glob [string tolower [HTTP::uri]] {
"*404/404/css/baselogin.css" {HTTP::respond 200 content [ifile get baselogin] "Content-Type" "text/css"}
"*404/404/images/icon_alert.gif" {HTTP::respond 200 content [ifile get icon_alert] "Content-Type" "image/gif"}
"*404/404/images/logo_percep_sm.gif" {HTTP::respond 200 content [ifile get percep_sm] "Content-Type" "image/gif"}
"*404/404/images/bkg_loginbody.gif" {HTTP::respond 200 content [ifile get bkg_loginbody]"Content-Type" "image/gif" }
"*404/404/images/bkg_loginbottom.gif" {HTTP::respond 200 content [ifile get bkg_loginbottom]"Content-Type" "image/gif" }
"*404/404/images/bkg_logintop.gif" {HTTP::respond 200 content [ifile get bkg_logintop]"Content-Type" "image/gif" }
"*404/404/images/bkg_logintop.gif" {HTTP::respond 200 content [ifile get bkg_splashbody]"Content-Type" "image/gif" }
}
}
when HTTP_RESPONSE {
if { [HTTP::status] == 404 } {
HTTP::respond 200 content [ifile get "main_index"] noserver "Content-Type" "text/html" }
}