[dns-operations] bug in Apache handling of real FQDNs
TOURNAT Guillaume
gtournat at tibco.fr
Mon Jun 8 15:09:20 UTC 2015
Yes, mod_rewrite is already loaded. If it was not, "apache2ctl configtest"
would have complained.
-----Message d'origine-----
De : Craig Leres [mailto:leres at ee.lbl.gov]
Envoyé : lundi 8 juin 2015 17:08
À : TOURNAT Guillaume; Fred Morris; dns-operations at dns-oarc.net
Objet : Re: [dns-operations] bug in Apache handling of real FQDNs
On 06/08/15 01:32, TOURNAT Guillaume wrote:
> Here are apache rewrite rules that redirect to the url without the
trailing
> dot:
>
> RewriteEngine On
>
> # Don't switch protocols
> RewriteCond %{HTTPS} =on
> RewriteRule ^(.+)$ - [env=myproto:https]
> RewriteCond %{HTTPS} !=on
> RewriteRule ^(.+)$ - [env=myproto:http]
>
> # Remove trailing dot
> RewriteCond %{HTTP_HOST} ^(.*)\.$
> RewriteRule ^(.*)$ %{ENV:myproto}://%1$1 [R=301,L]
Do you have mod_rewrite enabled?
dot 3 % fgrep mod_rewrite /usr/local/etc/apache24/httpd.conf
LoadModule rewrite_module libexec/apache24/mod_rewrite.so
Craig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4803 bytes
Desc: not available
URL: <https://lists.dns-oarc.net/pipermail/dns-operations/attachments/20150608/8880599d/attachment.bin>
More information about the dns-operations
mailing list