I currently have enabled SSL for my entire site being hosted with Apache. Lets say my website is http://example.com/ hosted at the root /var/www/html. I would like to write a rule in my apache config file that redirects https for everything except http://example.com/Hello.php. Can anyone help. I do not have a .htaccess file so this needs to be a rule that can be written in apache config, or my 000-default.conf file.
Asked
Active
Viewed 39 times
1 Answers
0
If you have mod_rewrite available, you could use something such as:
RewriteEngine on
RewriteRule !"^/Hello.php" "https://testing.com/$1" [R,L]
But there might be other ways available, as well.
Thomas N
- 436
- 2
- 9