If you are using SNI to secure the access to your site through SSL, you might decide that you do not want to use SSL for the frontend, as users of old clients such as Android 2 or Internet Explorer 8 on Windows XP won’t be able to access the site. But for the backend, old clients should not be a problem.
So this solves the redirection in two ways:
- Frontend gets redirected to HTTP if accessed through https (optional)
- Backend gets redirected to HTTPS if accessed through http
Put this in your .htaccess after “RewriteEngine On” (assuming Apache webserver):
# 1. optionally: redirect FE to http RewriteCond %{HTTPS} on RewriteCond %{REQUEST_URI} !^/?typo3 RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] # 2. redirect BE to https RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI} ^/?typo3 RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
And hopefully, your backend access is now securely encrypted…