paulcruice Posted September 19 Share Posted September 19 (edited) In my .htaccess file I require that the following sites http://www.thelogos.nethttp://thelogos.nethttps://www.thelogos.net all be redirected to https://the-logos.net At the moment the first two redirect correctly but I can't get https://www.thelogos.net to redirect to https://the-logos.net. What is wrong? Do I need to redirect https://www.thelogos.net to http://www.thelogos.net first then redirect the other two to https://the-logos.net Among the above .htaccess file redirects, I also require a redirect of this domain, thelogos.au to https://the-logos.net I would really appreciate your help. My current htaccess file (which does not fully work) written by my hosting company is as follows: RewriteEngine On RewriteCond %{HTTP_HOST} the-logos\.net [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://the-logos.net/$1 [R,L] RewriteCond %{HTTP_HOST} ^thelogos\.au$ [OR] RewriteCond %{HTTP_HOST} ^www\.thelogos\.au$ RewriteRule ^/?$ "https\:\/\/the\-logos\.net\/" [R=301,L] RewriteCond %{HTTP_HOST} ^the\-logos\.net$ [OR] RewriteCond %{HTTP_HOST} ^www\.the\-logos\.net$ RewriteRule ^thelogos\.au$ "https\:\/\/the\-logos\.net\/" [R=301,L] RewriteCond %{HTTP_HOST} ^the\-logos\.net$ [OR] RewriteCond %{HTTP_HOST} ^www\.the\-logos\.net$ RewriteRule ^\https\:\/\/www\.the\-logos\.net$ "https\:\/\/the\-logos\.net\/" [R=301,L] Edited September 19 by paulcruice Quote Link to comment Share on other sites More sharing options...
requinix Posted September 19 Share Posted September 19 Instead of deciding on all the different sites that someone could be accessing, think about this in terms of whether or not they're accessing the site you want them to. It's much easier that way. Somewhat separately from that, RewriteRule matches on paths, not on hostnames or full URLs. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.