Post by sayedsrkkhan » Sat May 26, 2018 4:22 pm

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

New member

Posts

Joined
Wed Apr 18, 2018 5:49 pm

Post by sayedsrkkhan » Sat May 26, 2018 4:46 pm

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.

New member

Posts

Joined
Wed Apr 18, 2018 5:49 pm

Post by sayedsrkkhan » Tue May 29, 2018 2:47 pm

any expert????? ??? ??? ??? ??? ??? ??? ??? ???

New member

Posts

Joined
Wed Apr 18, 2018 5:49 pm

Post by synapseindia » Tue May 29, 2018 6:21 pm

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]

User avatar
Active Member

Posts

Joined
Thu Apr 05, 2018 2:27 pm

Post by sayedsrkkhan » Wed May 30, 2018 2:35 am

Thank You Synapseindia... :) :-*

New member

Posts

Joined
Wed Apr 18, 2018 5:49 pm

Post by synapseindia » Wed May 30, 2018 7:38 pm

Your welcome :)

User avatar
Active Member

Posts

Joined
Thu Apr 05, 2018 2:27 pm

Post by MrPhil » Wed May 30, 2018 8:19 pm

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.

User avatar
Active Member

Posts

Joined
Wed May 10, 2017 11:52 pm

Post by sayedsrkkhan » Thu May 31, 2018 3:14 am

thank You Mr.phill

New member

Posts

Joined
Wed Apr 18, 2018 5:49 pm
Who is online

Users browsing this forum: No registered users and 100 guests