As far as I know body content rewriting it’s not possible with nginx, I
may be wrong, i’m a newbie with nginx.
What nginx supports is URL rewriting through HttpRewrite module and this
has nothing to do with returned body content rewriting.
URL Rewriting works when nginx receives a requests, it parses the URL
requested and rewrite as appropiate according to your rules. At this
point the call have not been made to the real request. It doesn’t matter
where the real call (after rewriting is done) is then sent, be it
reverse proxy, static, fcgi daemon, whatever you want.
What do you want is to rewrite the content that the backends returns,
that’s not something you can do with the HttpRewrite module.
What indeed you can do to solve your problem is to setup nginx to accept
ssl connections for that site, let the login form send users to ssl and
inside ssl server config in nginx place a 301 redirect to your http
server.
As far as I know body content rewriting it’s not possible with
nginx, I may be wrong, i’m a newbie with nginx. What nginx supports
is URL rewriting through HttpRewrite module and this has nothing to
do with returned body content rewriting.
Do you know if it add too much load on it to check every returned html
content?
Whenever this module allow regular expressions (right now says there it
accepts only variables) and allow to redirect user on match to another
page,
this would be a nice replacement for apache2 mod_security body parse
feature.
Thanks for the info, as I said I’m still a newbie with nginx
I actually have this working with httpsubmodule, but it doesn’t seem to
rewrite any files that are .php, .aspx. Only .html files, is this an
Nginx issue?