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
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.
with www add to cart and icon not working and non-www working fine.
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 -
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]
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
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.
Code: Select all
RewriteEngine On
RewriteCond %{HTTPS} !on [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ https://www.example.in/$1 [R=301,L]
Who is online
Users browsing this forum: No registered users and 100 guests