The .htaccess file in the SOTESHOP online store should not be changed directly from the server files. Therefore, we have created a module that allows you to add your entries from the administrative panel.
In the Admin Panel, go to Applications → Htaccess
We use redirects to choose the domain we use for search engines. Remember that the redirect works only when the store page is displayed after entering the domain.
Add the rule to the middle of the file when using the page in the form http://store-domain.pl
RewriteCond %{HTTP_HOST} ^www\.store-domain\.pl [NC]
RewriteRule ^(.*)$ http://store-domain.pl/$1 [L,R=301]
Add the rule to the middle of the file when using the page in the form http://www.store-domain.pl
RewriteCond %{HTTP_HOST} ^store-domain.pl [NC]
RewriteRule ^(.*)$ http://www.store-domain.pl/$1 [L,R=301,NC]
Add the rule to the middle of the file when using the page in the form https://store-domain.pl
RewriteCond %{HTTP_HOST} ^(www\.)(.*) [NC]
RewriteRule (.*) https://%2%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} !^(www\.)(.*) [NC]
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Add the rule to the inside of the file when using the page in the form of https://www.store-domain.pl
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]