0

When I search for the subdomain.domain.es I'm redirected to domain.es. Code in htaccess file:

RewriteEngine On
RewriteBase / RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://dominio.es/$1 [R=301,L]

My hosting company gave me the htaccess so my web was redirected from http to https but I have no clue of what any of this code means. I'm new to web programming so I hope you can help.

Thanks so much!

1

1 Answer 1

0

This answer worked for me. I hope this can help someone else!

RewriteEngine On RewriteCond %{HTTPS} off RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.