mozilla / ssl-config-generator

Mozilla SSL Configuration Generator
https://ssl-config.mozilla.org/
Mozilla Public License 2.0
358 stars 59 forks source link

Apache redirect should not use mod_rewrite #49

Closed ghost closed 5 years ago

ghost commented 5 years ago

Good day,

Thanks for your great tool !

According to this page mod_rewrite should not be used for simple redirection:

https://httpd.apache.org/docs/2.4/rewrite/avoid.html

One of the following can be used instead:

Redirect 301 "/" "https://www.example.com/" Redirect permanent "/" "https://www.example.com/"

april commented 5 years ago

The problem with that is now I have to have more notes for people to change things, and it only works for a single domain. That is to say, you'd have to add it to every VirtualHost.

The rule that it currently uses will work for every single VirtualHost, be it one or hundreds. Since it does 301's and not 302's, it should not be overly intensive on the web server.

april commented 5 years ago

That said, if you can find a way that doesn't use mod_rewrite and works for every domain, I'd be happy to switch.