Force https and www in with one redirect

Keywords: LAMP/MAMP/WAMP - AWS - Technical issue - Application configuration

bndiagnostic ID: ac921601-db43-11e5-8ef1-7cfb00c50987

bndiagnostic output:

? Apache: Found possible issues
? Resources: Found possible issues

bndiagnostic failure reason: The suggested guides are not related with my issue

Dear help team!

I have added the following code to my .htaccess file which already works fine for redirecting to my 404 page as well as removing .php extensions:
RewriteCond %{HTTP_HOST} !^www.(.)$ [OR,NC]
RewriteCond %{https} off
RewriteRule ^(.
)$$1 [R=301,L]
It should redirect from to but seems to be completely ignored. Instead there is a redirect from to at first and then another one to

Do you have any idea what is causing this behavior?
I thought perhaps there is some other configuration file somewhere else on the server that is also doing redirects. tells me that the first redirect from to is coming from Apache and the second one from to is coming from CloudFront (I am using Amazon Lightsail).

I hope I am being clear.

Thanks and kind regards,


Hi @IAmGrateful,

Can you check the following guide:


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.