Htaccess - enter your entries into the file.

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.

Table of Contents

In the Admin Panel, go to ApplicationsHtaccess ikona modułu Edycja pliku .htaccess

Konfiguracja htaccess w sklepie SOTESHOP

Configuration

  1. Enter the rule in:
    • Beginning of the file (and / or),
    • Middle of the file (and / or),
    • End of the file.
  2. Press the Save button.

Domain Redirection

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.

Redirect to URL without www (without ssl)

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]

Redirect to URL with www (without ssl)

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]

Redirect domain to URL without www (ssl mode)

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]

Redirecting a Domain to a URL with www (SSL Mode)

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]

Related Documentation

SOTE YouTube

Stay up to date with the latest SOTESHOP program updates. Subscribe to the SOTE YouTube channel.