Different redirects


Transform of a URL with a slash on without a slash in CS-Cart

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !\..+$
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*)  http://ваш_домен/$1/ [R=301,L]

Redirect from subsection

# If the section goes right after the site root
RewriteRule ^category/(.+)$ /$1 [L,R=301]

# If the required subsection is nested in another section
RewriteRule ^(.+/)*category/(.+)$ $1category1/$2 [L,R=301]

Redirect from http to https

RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]

# or so if the code above does not work

RewriteEngine On
RewriteCond %{ENV:HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

# or so if the code above does not work

RewriteEngine On
RewriteCond %{HTTP:PORT} !^443$
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R]



Connect

If you have any questions, want to get individual advice or you have an interesting offer, you can contact via the feedback form.

Or write to the email info@bobreod.ru





By submitting the form, you agree to our privacy policy