Reputation: 1801
In my file .htaccess
I have the following redirect
RedirectMatch ^(.+)/$ $1
If I follow by link e.g. https://example.com/path/
it redirects to http://example.com/path
So it removes the trailing slash as expected, but redirects to http
instead of https
How to change this specific redirect only so that it redirects to https://
without adding general redirect all requests to https ?
Upvotes: 0
Views: 33
Reputation: 2094
Simply add your domain with https like this:
RedirectMatch "^(.+)/$" "https://www.example.com/$1"
Upvotes: 1