I have a site that fully runs on HTTPS. And there is a file that does not need to be loaded in HTTPS. Therefore I tried to redirect it from htaccess but it didnt work.
RewriteCond %{HTTPS} on
RewriteRule ^xml$ http://mysite/api.php [L,R=301]
Here are the lines I tried but they did not work.
I tried this also but negative. HTTPS to HTTP htaccess redirect for home page only
you could just use a simple 301 redirect. Just put this in your .htaccess
redirect 301 /api.php http://mysite/api.php
That should work becuase it's just taking the api.php file on either https or http and telling it to go to
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.