Forum Moderators: phranque

Message Too Old, No Replies

conditional https

         

digiweb

4:05 am on Jul 27, 2011 (gmt 0)

10+ Year Member



Would I use rewrite for this problem? I want certain pages to be https. Basically anything of the pattern

/class-registration?task=$1&event_id=$2

I've tried a few hundred combinations, only succeeding in erroring out with too many redirects or a 500 server error.

Many thanks for any tips.

lucy24

4:33 am on Jul 27, 2011 (gmt 0)

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



Would I use rewrite for this problem?

Short answer: only if you are absolutely certain you know what you are doing. Is there a problem with shifting everything to https? It may be less painful in the long run.

Recent threads asking similar questions:
[webmasterworld.com...]
[webmasterworld.com...]
[webmasterworld.com...]

Note that you have to redirect in both directions: urls in one form have to be forced to https, while urls in all other forms have to be forced to http. That includes your own internal links; a relative link will arrive as either http or https depending on the originating page.

digiweb

5:02 am on Jul 27, 2011 (gmt 0)

10+ Year Member



lol that's funny. I gave up and did that.

I've purchased the Apress book on mod rewrite, read a few hundred forum posts, and I already knew regular expressions. I don't know why this won't sink in.