Custom Error Pages Using .htaccess

Unanswered Question
Apr 30th, 2008

Hi All

Im new to Ironport Nation and would like some help setting up custom error pages

I have an Apache server setup with custom errors but am having trouble with my.htaccess and mod_rewrite i believe it needs to be something like


rewriteEngine on
rewriteCond %{query_string} ^URL_Cat=nc&WBRS=dns$
rewriteRule ^errors$ [R=301,L]

redirects to

I would also like to incorporate
URL_Cat=nc&WBRS=dns pagenotfound.html
URL_Cat=Adul&WBRS=- adult.html
URL_Cat=Game&WBRS=- games.html
URL_Cat=C_Bloc&WBRS=- custom.html

i know the .htaccess (mod_rewite) is wrong thats where i need help
Thanks in advance


I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
jowolfer Thu, 05/01/2008 - 16:29


I don't have any previous experience using the mod rewrite. I'm asking around to see if anyone can provide some assistance.

You've probably already seen it, but here is a link to the online manual for this functionality:

I'll see what I can find. No luck yet =)

Doc_ironport Thu, 05/01/2008 - 22:25

Is there a reason you're trying to use mod_rewrite to do this?

The EUN redirection was designed to be directed to a CGI script, which can then dynamically generate the error page based on the criteria passed in, which allows you to customize the error returned (eg, you can list the full category name which is blocked, for example)

If you really want to have it directing to a static page you can still do this in a CGI script rather than using mod_rewrite.

If you get the config right then mod_rewrite should work, but it's almost certainly going to be overkill...

redeemer_ironport Fri, 05/02/2008 - 00:53

no reason ,
I guess we use mod_rewrite for other things and find it to be an extremely powerful tool and knowing nothing about cgi scripts made it an attractive choice

If cgi is another option would anyone be able to share their script with us

Im still interested to know in the mod_rewrite solution if anyone come across it, im sure it will still be useful

thanks :)

Bart_ironport Sun, 05/04/2008 - 10:59

If I'm not mistaken, you can just specify multiple RewriteCond/RewriteRule combinations. Something like this:

rewriteEngine on
rewriteCond %{query_string} ^URL_Cat=nc&WBRS=dns$
rewriteRule ^errors$ [R=301,L]
rewriteCond %{query_string} ^URL_Cat=adult&WBRS=$
rewriteRule ^errors$ [R=301,L]
cwling2008 Thu, 08/21/2008 - 15:54


Do we have any workaround to hide the transaction ID in URL link?


Doc_ironport Mon, 08/25/2008 - 00:22

Do we have any workaround to hide the transaction ID in URL link?

There's no way to hide it, but why would you want to?

From the end users perspective it's a meaningless number that only shown in the URL.


This Discussion