Can rewrite change port? for eg, 80 to 443

baalchina baalchina at
Mon Jul 21 11:18:36 MSD 2008

Hi, everyone.

I have a server running a php web forum. User logging into my site
using 'logging.php'.

I had set up a https server using nginx, but consdering server load, I
just want my user using https in only logging.php.

I want to settle this by using url rewrite. When my users click, nginx will automatic change the url to And when my user click any other links
in my site, for example,, nginx will
change https to http.

Can rewrite work like this?

Thank you!

BTW,changing my forum codes may work, but I didn't know much about php, I want to settle this in nginx rewrite...


More information about the nginx mailing list