Hi Igor, Thanks for your help, but this doesn’t seem to work. From a bit of testing, it looks like the RewriteRule starting with “/” simply doesn’t catch anything. Any other ideas? Or are there any logs I can check/set up for mod_rewrite? Thanks all! Andrew From: Igor Cicimov [mailto:icicimov@xxxxxxxxx]
On Fri, Feb 8, 2013 at 10:51 AM, Andrew White <andrew@xxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi all,
I've been writing a rewrite rule to try and redirect all of our traffic from
mysite.com.au to
www.mysite.com.au. I also need to conditionally redirect depending on SSL enabled or not.
I've hacked on a bit from askapache.com to
create a variable that holds either http or https dependently. Below is the code I'm using:
This works fine for URLs with paths (e.g.
mysite.com.au/foo redirects to
www.mysite.com.au/foo) and does the http and https switch fine.
However when just accessing the domain (just
mysite.com.au) it redirects tohttp://www.mysite.com.au/home/website/public_html/:/www.mysite.com.au/
I'm sure it's something very small and basic I'm missing - if someone could point it out, that'd be appreciated.
Thanks!
Andrew Try this way
|