http to https redirect
i want to redirect all http non www and www to https with www, for example
anyone can help?
domain.com to https://www.domain.com
www.domain.com to https://www.domain.com
https://domain.com to https://www.domain.com
anyone can help?
-
Hello, This is answered on the following thread: Tips for .htaccess Thank you. 0 -
Hello, This is answered on the following thread: Tips for .htaccess Thank you.
RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.domain.com/$1 [R,L]
i've used this one but it has no effect.0 -
Hello, Try using the example on the following post: Force https question Thank you. 0 -
same, it wont work. 0 -
Hello, Could you post the contents of the .htaccess file you tried using, ensuring to replace real domain names with examples? Thank you. 0 -
my .htaccess was empty. i put the code that was specified in your links and replaced domain.com with my real domain. for now i've found a working solution: RewriteEngine On RewriteCond %{HTTP_HOST} ^domain\.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
i'm not sure if this is correct but it gets the job done, it points all my non https with or without www to ssl with www.0 -
[QUOTE="'Giovanni, post: 2505295, member: 103904">my .htaccess was empty. i put the code that was specified in your links and replaced domain.com with my real domain. for now i've found a working solution: RewriteEngine On RewriteCond %{HTTP_HOST} ^domain\.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
i'm not sure if this is correct but it gets the job done, it points all my non https with or without www to ssl with www.
Hi Giovanni Where you add this "domain" does has to be a real domain name and second, you need to add for all domains ?0 -
Where you add this "domain" does has to be a real domain name and second, you need to add for all domains ?
Hello @theluli, Yes, it should be a real domain name. You should only have to add it to the document root of the domain name you want redirected. Thank you.0 -
Hello @theluli, Yes, it should be a real domain name. You should only have to add it to the document root of the domain name you want redirected. Thank you.
Thanks man, that helped a lot0
Please sign in to leave a comment.
Comments
9 comments