Even after adding your rewrite rules, it doesn't change Apache behaviour. It
seems that redirection does not occur.

Bad Request
Your browser sent a request that this server could not understand.



-----Message d'origine-----
De : dns-operations [mailto:[email protected]] De la part
de Craig Leres
Envoyé : dimanche 7 juin 2015 00:11
À : Fred Morris; [email protected]
Objet : Re: [dns-operations] bug in Apache handling of real FQDNs

On 6/6/2015 10:56 AM, Fred Morris wrote:
> By "real" I mean "really fully qualified", as in "ending in a dot".
> 
> Try this:
> 
>   https://apache.org.
> 
> Take note of the final dot. (Try https://apache.org./foo if you like.) 
> In any case what you'll see is:
> 
> 1) You get asked to accept an untrusted cert.
> 
> 2) You get 400 Bad Request.
> 
> Thoughts? Comments? Worth reporting?

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]

                Craig
_______________________________________________
dns-operations mailing list
[email protected]
https://lists.dns-oarc.net/mailman/listinfo/dns-operations
dns-jobs mailing list
https://lists.dns-oarc.net/mailman/listinfo/dns-jobs

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
dns-operations mailing list
[email protected]
https://lists.dns-oarc.net/mailman/listinfo/dns-operations
dns-jobs mailing list
https://lists.dns-oarc.net/mailman/listinfo/dns-jobs

Reply via email to