From: John Corry on 1 Dec 2009 08:36 My apologies, this is not strictly PHP...but it is relevant to a great number of PHP application frameworks that many of us use or will use. I have a Magento installation that relies heavily on mod_rewrite. For the most part, I have all of my canonical URLs worked out, minus one issue. How do I make sure that https:// requests for / are redirected to http:// / ? I've got a rule already that strips the index.php off of requests, so I don't want to check for that...just want to check for requests for the https:// version of my root home page and redirect to the non-secure version. I suck with regex and all of my attempts to modify examples I've found have failed. -- John Corry PHP developer - 3by400, Inc http://www.3by400.com
From: Kim Emax on 1 Dec 2009 08:58 Hey John 2009/12/1 John Corry <jcorry.lists(a)gmail.com> > My apologies, this is not strictly PHP...but it is relevant to a great > number of PHP application frameworks that many of us use or will use. > Well, still, you should ask in an apache forum :-) I have a Magento installation that relies heavily on mod_rewrite. For the > most part, I have all of my canonical URLs worked out, minus one issue. > > How do I make sure that https:// requests for / are redirected to http:/// > ? > I´ve once solved that by the virtualhost block (http://webmail var directed to https://webmail) > I've got a rule already that strips the index.php off of requests, so I > don't want to check for that...just want to check for requests for the > https:// version of my root home page and redirect to the non-secure > version. > > I suck with regex and all of my attempts to modify examples I've found have > failed. > well, ^means start of line, but the rewrites I´ve got examples of and are using at work says ^admin so that´s cleary the query_string, not the entire URL. (I haven´t used mod_rewite at all until this week...) And as I see it nothing come close to what you want here: http://httpd.apache.org/docs/2.0/misc/rewriteguide.html, so maybe it´s not possible? or you do this: RewriteRule ^(.*)$ https://yoursite.com$1 This should catch everything in the query_string and save it in $1, maybe that works? Kind regards Kim
|
Pages: 1 Prev: When will we get the official x64 php binaries? Next: request for support |