Shop administration - .htaccess file editing

In administration panel go to Configuration => Configure modules

Select .htaccess file editing module


Configuration

  1. Enter a request in the:
    • Beginning of the file (and / or),
    • Center of the file (and / or),
    • End of the file.
  2. Press Save.

Domain redirection

Redirections are used to select the domain for search engines. Remember that redirection works correctly only when your shop page shows up after typing the domain.

Redirection to url address without www (without ssl)

Add the request to the center of the file, if you want to display your site at http://shopexample.com

RewriteCond %{HTTP_HOST} ^www\.shopexample\.com [NC]
RewriteRule ^(.*)$ http://shopexample.com/$1 [L,R=301]

Redirection to url address with www (without ssl)

Add the request to the center of the file, if you want to display your site at http://www.shopexample.com

RewriteCond %{HTTP_HOST} ^shopexample.com [NC]
RewriteRule ^(.*)$ http://www.shopexample.com/$1 [L,R=301,NC]

Redirection to url address without www (ssl mode)

Add the request to the center of the file, if you want to display your site at https://shopexample.com

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]

Redirection to url address with www (ssl mode)

Add the request to the center of the file, if you want to display your site at https://www.shopexample.com

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]