httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chintan Kachhi <chintankac...@gmail.com>
Subject [users@httpd] How to get the module to work with the rewrite condition?
Date Thu, 16 Jul 2009 17:41:59 GMT
I am trying to redirect to my custom error page when a particular url is
hit... I am trying to follow as per this link:


http://fixunix.com/websphere/373084-use-custom-404-page-when-running-but-application-isstopped.html


where one of the relevant responses for me is what Eric had posted:

I don't believe you'll find a solution to this that has acceptable
performance.

There may be a way to do this with mod_rewrite and the LA (lookahead)
flag, but that effectively doubles the load of the traffic going to WAS.

You might look at having your administrators touch a magic file in IHS
during the redeploy of the app, and teaching mod_rewrite to return a
custom error page when that file exists.

This doc will partially help:

http://publib.boulder.ibm.com/httpse...alter_uri.html

RewriteCond /opt/IHS/conf/applicationdown.txt -f
RewriteRule ^/app1/foo /errormessage.html [PT]




I am trying the last two lines where I do a rewrite condition and the
rewrite rule.

But seems like this is not working either... is there a particular place
where the applicationdown.txt and errormessage.html files need to be?
My document root is C:/WebSphere/IBMHTTPServer/htdocs/en_US

I tried putting the applicationdown.txt file under directly under my
document root directory, but it does not work.

I also tried putting the applicationdown.txt in my IHS/conf directory as
shown in the example.
For my rewrite rule, i put:
RewriteRule ^/app1 /errormessage.html
where errormessage.html was put under my document root directory. But this
still does not work. Am I using the right directory structure to run this
module?

Mime
View raw message