Ad
TYPO3 HTACCESS | Changing HTTPS To HTTP In Url Redirects Me To The Root Page
When I change my url from https://www.example.com/company/ to http://www.example.com/company/ I get redirected to the root page instead of it changing HTTP to HTTPS. What am I missing?
Here is my HTACCESS file, I am using a TYPO3 CMS 7.6.19
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Ad
Answer
The default .htaccess file for TYPO3 does some rewriting of its own. If you place this below at the bottom of that file, it will first execute the default rules. This will mess up your redirect. You should add these redirect rules above the default TYPO3 rewrite rules, so just below the existing RewriteEngine On
.
Ad
source: stackoverflow.com
Related Questions
- → .htaccess - not routing to public folder
- → Laravel 4.2 application occurs unnecessary redirection after uploading live server
- → Htaccess negation
- → Building sitemap for 2 wordpress install under 1 domain
- → htaccess not working properly for sub url having more slashes
- → How to give access execute specific php file in server?
- → 301 Redirection from no-www to www in wordpress
- → Cyclical redirection at the start laravel 5 project
- → Can't route in Laravel framework
- → codeigniter seo url with htaccess
- → PHP Seo Friendly URL
- → Convert URL to SEO Friendly
- → IP Canonicalization (WordPress)
Ad