Page 1 of 1

http://www

Posted: Wed Sep 05, 2018 10:44 pm
by leeburgess
OC 3.0.2.0

If someone visits my site at http://example.co.uk how can I set it so it goes to http://www.example.co.uk and also always to us Https? SSL is enabled in admin.

Re: http://www

Posted: Wed Sep 05, 2018 10:56 pm
by straightlight

Re: http://www

Posted: Fri Sep 07, 2018 4:52 am
by leeburgess
Thank you if I type the following it works great but SEO URLs no longer work.

RewriteCond %{HTTPS} off
# First rewrite to HTTPS:
# Don't put www. here. If it is already there it will be included, if not
# the subsequent rule will catch it.
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Now, rewrite any request to the wrong domain to use www.
# [NC] is a case-insensitive match
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Re: http://www

Posted: Sat Sep 08, 2018 1:00 am
by leeburgess
Anyone know how to resolve this please?

Re: http://www

Posted: Sun Sep 09, 2018 10:48 pm
by leeburgess
Anyone?

Re: http://www

Posted: Sun Sep 09, 2018 11:12 pm
by MrPhil
Please don't be so impatient. The people responding are volunteers, and it is the weekend.

First, see my update today to one of the suggested fixes: viewtopic.php?f=181&t=170631 . The given solution is not optimal, but I don't know if it has a bearing on your case. When you say it breaks SEO, could you give an example URL that works, and one that doesn't, and what happens? An R=301 should update the visible address in the browser (for the benefit of the user or the search engine), but you don't want to use it for rewrites to internal forms (e.g., index.php?keyword=value&keyword=value). The usual practice is to put the return status code (R=301) first and the leave flag (L) second, but I don't know if some servers see a difference. Do you have any other rewrites or redirects, especially ahead of this one? A generic rewrite/redirect like this one should come before rewrites for SEO->real URL. Finally, you are on a server (e.g., Apache) that reads and processes an .htaccess file, right?