You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Scott Gifford <sg...@suspectclass.com> on 2009/04/20 08:33:44 UTC

Re: [users@httpd] Redirecting request from HTTP to HTTPS

"Tarun Narang" <Ta...@Xchanging.com> writes:

> How could I redirect all my requests for http to https ?

Hello Tarun,

We use RedirectMatch for this.  See:

    http://httpd.apache.org/docs/2.0/mod/mod_alias.html#redirectmatch

> However, I have to redirect the non SSL request to SSL request, like when the
> user requests for http://localhost:8080/hsbc it should be redirected to

Try something like this:

    RedirectMatch ^/hsbc(.*)$ https://localhost:4430/hsbc$1

I hope this helps, I'm not sure I understood exactly what you were
asking in your message.

Good luck!

----Scott.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org