Forum Moderators: phranque

Message Too Old, No Replies

Rewrite one directory to SSL

         

obrienmd

6:05 pm on Jan 21, 2009 (gmt 0)

10+ Year Member



I'd like all requests for "http://{myserver}/civicrm" to go to "https://{myserver}/civicrm".

Is there an easy mod_rewrite condition/ruleset I can use to make this happen? Also, if it matters, civicrm is not a real directory in my apache file structure, it's a part of my content management system.

g1smd

8:13 pm on Jan 21, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Check the sticky threads at the top of the forum.

This must be among the "top 5" questions asked here. :)

obrienmd

8:17 pm on Jan 21, 2009 (gmt 0)

10+ Year Member



Sorry, don't see the sticky thread... Am I blind?

jdMorgan

8:27 pm on Jan 21, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Probably referring to the "Search WebmasterWorld" link at top left, or the Apache Forum Library.

Is {myserver} a variable, or is it a fixed-value hostname?

In other words, would the proposed code apply to more than one single domain or subdomain (e.g. "www")?

Jim

[edited by: jdMorgan at 8:29 pm (utc) on Jan. 21, 2009]

obrienmd

8:38 pm on Jan 21, 2009 (gmt 0)

10+ Year Member



myserver is a fixed-value hostname, removed on this forum for anonymity

jdMorgan

9:01 pm on Jan 21, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



OK, then this search [google.com] should help.

Jim

obrienmd

10:09 pm on Jan 21, 2009 (gmt 0)

10+ Year Member



I've read through many of those search results, and they would absolutely solve my problem if I had a subdirectory to put the additional .htaccess file into. However, I'm using a CMS for this site, so the path isn't really pointing to a subdirectory.

Thoughts?