Forum Moderators: phranque

Message Too Old, No Replies

need help with selective ssl rewrite

mod_rewrite vhosts regexp

         

bobs

12:02 am on Jun 10, 2010 (gmt 0)

10+ Year Member



I need to rewrite several
http://app1.foo.com
to
https://app1.foo.com
, and
http://app2.foo.com
to
https://app2.foo.com
, but other
http://www.foo.com
and
http://foo.com
should stay on http.

I (think I) see how [webmasterworld.com] to rewrite all the URLs, but I need to be selective based on a regex in the RewriteCond to match the names I want to rewrite. They're all vhosts on the same server, controlled by the same vhost config generator template.

Suggestions are gratefully welcomed!

jdMorgan

4:15 pm on Jun 10, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



So maybe use ^(app1|app2|app3)\.example\.com as the regex pattern in the RewriteCond examining %{HTTP_HOST}...

There's a fairly-concise regex tutorial cited in our Forum Charter if you need help with that aspect of the problem.

Jim