I'm forcing http to https with the following in .htaccess:
## Forcing https
RewriteCond %{HTTPS} !^on$
RewriteRule (.*) https://website.com/$1 [R,L]
Following that, I also have a redirect that redirects users from the web root of this site to a subdirectory:
RedirectMatch ^/$ /subdirectory/
One of the problems I'm experiencing is that when I have the HTTPS redirect above enabled, the following URL doesn't work (among others):
http://website.com/api/auctane
It just redirects to https://website.com/subdirectory.
So I'm having to leave off the forced HTTPS just to allow access to the API URL.
My question: What would it take to redirect this:
http://website.com/api/auctane
to this:
https://website.com/api/auctane
Or to only redirect users to HTTPS if they specifically go to webroot http://website.com/