Skip to content

Instantly share code, notes, and snippets.

@chesio
Created November 28, 2018 19:09
Show Gist options
  • Save chesio/f25f1d9bc3800ab08e004c667822b281 to your computer and use it in GitHub Desktop.
Save chesio/f25f1d9bc3800ab08e004c667822b281 to your computer and use it in GitHub Desktop.
Apache version detection
<IfModule mod_version.c>
<IfVersion >= 2.5>
RewriteRule ^ https://httpd.apache.org/docs/trunk/ [R=301,L]
</IfVersion>
<IfVersion >= 2.3>
RewriteRule ^ https://httpd.apache.org/docs/2.4/ [R=301,L]
</IfVersion>
<IfVersion >= 2.1>
RewriteRule ^ https://httpd.apache.org/docs/2.2/ [R=301,L]
</IfVersion>
<IfVersion >= 2.0>
RewriteRule ^ https://httpd.apache.org/docs/2.0/ [R=301,L]
</IfVersion>
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment