Welcome,
I have a problem with my domain.
In .htaccess I have set http and www to redirect to
domainname.com
as below
And now when I enter the address https://domainname.com/demo, it brings me to the Demo page
But if I enter the address https://www.domainname.com/demo or http://www.domainname.com/demo it takes me to the page https://domainname.com/index.php
How to set it to redirect to https: // after entering the address from http and / or www keeping the target page and not to the main index.php
Please help me
PS. Sorry for my English...
I have a problem with my domain.
In .htaccess I have set http and www to redirect to
DomainName.com
Apache config:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^(.*)$ https://
%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
But if I enter the address https://www.domainname.com/demo or http://www.domainname.com/demo it takes me to the page https://domainname.com/index.php
How to set it to redirect to https: // after entering the address from http and / or www keeping the target page and not to the main index.php
Please help me