Page 1 of 1
my website open with 3 link ,how to make it one.
Posted: Sat May 26, 2018 4:22 pm
by sayedsrkkhan
Hello, again I am asking a question,
I use
OC2.3.0.2 and my website open with 3-4 link Like:
a.)
https://example.in
b.)
http://www.example.in
c.)
https://www.example.in
d.)and without HTTP and https
so i want to open my website with only one link https://www.example.in.
so i changed in .htaccess file but no solution.
can someone tell for, e right solution for ,i want just someone type in address bar example.in then he/she will redirect on
https://www.example.in
Re: my website open with 3 link ,how to make it one.
Posted: Sat May 26, 2018 4:46 pm
by sayedsrkkhan
I did Through rewrite engine it is working well but some of my icons not seen and one biggest problem is when i click on add cart button, product not going to cart.
with www add to cart and icon not working and non-www working fine.
Re: my website open with 3 link ,how to make it one.
Posted: Tue May 29, 2018 2:47 pm
by sayedsrkkhan
Re: my website open with 3 link ,how to make it one.
Posted: Tue May 29, 2018 6:21 pm
by synapseindia
Firstly, please change your config.php file in root directory and admin directory for "HTTP" and "HTTPS" URL.
Then made changes accordingly in .htaccess file.
For example -
Code: Select all
RewriteBase /
RewriteCond %{HTTP_HOST} ^exampleee\.com
RewriteRule (.*) http://www.exampleee.com/$1 [R=301,L]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Re: my website open with 3 link ,how to make it one.
Posted: Wed May 30, 2018 2:35 am
by sayedsrkkhan
Thank You Synapseindia...

Re: my website open with 3 link ,how to make it one.
Posted: Wed May 30, 2018 7:38 pm
by synapseindia
Your welcome

Re: my website open with 3 link ,how to make it one.
Posted: Wed May 30, 2018 8:19 pm
by MrPhil
No, that's bad code because it can force
two round trips between the server and browser (once to add www and once to change to https). Search engines will penalize you for this. Set it up to do just
one redirect, such as with
Code: Select all
RewriteEngine On
RewriteCond %{HTTPS} !on [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ https://www.example.in/$1 [R=301,L]
I don't know what your understanding of "opens with three links is", but it's good to catch more user attempts to get the name right. I must assume that what you really meant was "I want the visitor to see just one correct form, no matter what they type in", which the 301 redirect will do for you. It
is possible to make it fail (e.g., 404 error) if the visitor types in http instead of https, or leaves off the www, but that would be silly to do. By the way, there's no such thing as "without http or https". If you type in just the domain name, without the protocol (http://), the browser will automatically add http:// for you. It just may not display that way.
Re: my website open with 3 link ,how to make it one.
Posted: Thu May 31, 2018 3:14 am
by sayedsrkkhan
thank You Mr.phill