Re: http to https redirection with an exception

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Joshua Slive wrote:
> Assuming you are using 2.x, you can use a negative-lookahead in the
> regex to match exactly anything other than robots.txt. But the effect
> will be the same.

Thank you so much, that's just what I'm looking for. Following your
advice, finally, I changed my httpd.conf like this:

  RedirectMatch permanent
                '^(/(?!robots\.txt$).*)$' 'https://www.example.com$1'

This works fine, and redirects exactly anything other than robots.txt.

Thank you.
Best Regards,
-- 
Hirotsuna Mizuno <h-mizuno@xxxxxxxxxxxx>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux