0

I am new to Apache and it's syntactic elements, so i have to ask this here. I wanted to know, if there is a way to use the command Redirect permanent / http://foo.bar without specifying the protocol. I have a ton of such statements on the VirtualHost-Layer and wish to preserver the used protocol.

Can i just leave it out? Do i have to use RewriteCond? Is it applicable in the VirtualHost context?

Thank you and best regards

  • Took me 3 seconds to find an answer stackoverflow.com/questions/19372594/… – sysfiend Nov 22 '16 at 9:36
  • @Alex That would be an answer, if i had asked for RewriteCond, which i do not know, that it works in that context, hence the other text i wrote there. – scones Nov 22 '16 at 9:44
  • @scones by "without specifying the protocol" you mean permanent redirect for both http and https? – David B. Nov 22 '16 at 11:58
  • @DavidB. yes. Sorry for the inexact terminology. I am trying to figure this whole area out. – scones Nov 22 '16 at 14:19
  • 1
    In that case the link posted by @Alex is indeed what you should look into. – David B. Nov 23 '16 at 10:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.