0

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.

Jenny D
  • 27,358
  • 21
  • 74
  • 110
John Wick
  • 105
  • 2
  • You might post what you've tried doing, already. Would also help narrow down what might or might not be possible in your configuration. – Thomas N Nov 03 '17 at 17:18

1 Answers1

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