Forum Moderators: phranque
# If this global file exists, we're offline.
RewriteCond /v/xyz.com/asg/offline/offline..html -f
RewriteRule .* /v/xyz.com/asg/offline/offline.html [L]
which means as soon as it finds the offline.htm page in /v/xyz.com/asg/offline it throws my outofservice page. (which is offline.html)
so all the trafic coming from www.abc.com gets redirected to offline.html page which says the site is temporarily down.
but i have something like www.xyz.com/cgi-bin/print i want this site to be live....but due to my rewrite rule it throws offline.html page as this url is coming from www.xyz.com
can i write some condition which says www.xyz.com/cgi-bin/print should not be redirected....i guess there should be some condition.....
its kind of looping
in short i don't want to redirect my directory /l/apache/cgi-bin/application
as i write my cgi application which i want throw to customer so that i can collect user information
Rahul
Welcome to WebmasterWorld!
Adding two RewriteConds to prevent looping and to prevent rewriting /cgi-bin/print requests, we get:
RewritCond %{REQUEST_URI} !^/offline/offline.html$
RewritCond %{REQUEST_URI} !^/cgi-bin/print
RewriteCond /v/xyz.com/asg/offline/offline\.html -f
RewriteRule .* /v/xyz.com/asg/offline/offline.html [L]
RewritCond %{REQUEST_URI} !^(/offline/offline.html¦/cgi-bin/print)
RewriteCond /v/xyz.com/asg/offline/offline\.html -f
RewriteRule .* /v/xyz.com/asg/offline/offline.html [L]
Jim
1 issue:
here is the last isseu
in my offline.html i m redirecting it to www.abc.com/cgi-bin/rahul.cgi
rahul.cgi has a button...print "<html> <form action=http://abc.com/cgi-bin/customers.cgi> <input type=submit value=submit></form></input>";
the issue is when i click the button, its looping now and again goes back to www.abc.com/cgi-bin/rahul.cgi
once i get rid of this issue, i m all set.....
why do i get looping when i click submit button on rahul.cgi page
as soon as i remove offline.merchantaccount.html file the www.abc.com/cgi-bin/rahul.cgi should be redirected back to www.abc.com
this is because my file rahul.cgi still exists on the server so if someone refresh what they are getting is rahul.cgi page BUT i have already removed html page so if someone refresh page www.abc.com/cgi-bin/rahul.cgi they should get redirected to original www.xyz.com
how do i modify rewrite rule.