Is it possible to do a redirect to https with exceptions?

redirect now set up so
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

was an urgent need to redirect some pages, about 10. as it is possible to implement it using htaccess
August 19th 19 at 23:37
2 answers
August 19th 19 at 23:39
Solution
still the question arose., in the standard htaccess redirect codeigniter
RewriteCond $1 !^(index\.php|robots\.txt|images|css|js)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
and it turns out that the links in the exception
RewriteCond %{REQUEST_URI} !api*
redirects to
/index.php?/api
August 19th 19 at 23:41
Solution
put another RewriteCond ahead, with exceptions for those 10 pages

httpd.apache.org/docs/2.4/rewrite/flags.html#flag_l
thanks, just found it) - sherwood_Koepp commented on August 19th 19 at 23:44
still the question arose., in the standard htaccess redirect codeigniter
RewriteCond $1 !^(index\.php|robots\.txt|images|css|js)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
and it turns out that the links in the exception
RewriteCond %{REQUEST_URI} !api*
redirects to
/index.php?/api - sherwood_Koepp commented on August 19th 19 at 23:47

Find more questions by tags ApacheCodeIgniterhtaccess