airclix Designer من Canada عضو منذ نوفمبر 2018 airclix 13 مارس 2019 04:13 Hi there, I have a .htaccess file on my home directory on the server which redirects https://airclix.com/ => https://www.airclix.com/ The rule is as follows: 301 --- https://airclix.com/ => https://www.airclix.com/ RewriteCond %{HTTP_HOST} ^airclix.com$ RewriteCond %{REQUEST_URI} !^/[0-9]+..+.cpaneldcv$ RewriteCond %{REQUEST_URI} !^/.well-known/pki-validation/[A-F0-9]{32}.txt(?:\ Comodo\ DCV)?$ RewriteRule (.*)$ https://www.airclix.com/$1 [R=301,L] When the url https://airclix.com is entered it is automatically redirected to https://www.airclix.com. However, when the url contains /webshop/ such as https://airclix.com/webshop/ it will not redirect to https://www.airclix.com/webshop/. There is a also a .htaccess file in the "webshop" directory on the server which also has a rewrite rule as follows: Redirect non-www to www #RewriteCond %{HTTP_HOST} !^www. #RewriteCond %{REQUEST_METHOD} !=POST #RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] I wondering what I should do with 2 .htaccess files. Should there be only one? Should I delete one? Or what can I do so https://airclix.com/webshop/ redirects to https://www.airclix.com/webshop/ Thanks, Miles
tim Founder من Sweden عضو منذ مايو 2013 tim 13 مارس 2019 19:35 Uncomment the # before RewriteCond for it to have effect.
airclix Designer من Canada عضو منذ نوفمبر 2018 airclix 13 مارس 2019 20:11 Thanks! That was easy. Works now. Miles