Re: Header set Link?

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

 



Header add Link "<https://%{HTTP_HOST}e%{REDIRECT_PDF_CANONICAL_URL}e>; rel=\"canonical\"" env=REDIRECT_PDF_CANONICAL_URL

      
However, the %{HTTP_HOST} variable doesn't seem to be set.
I don't think you can expect that environment variable to be defined.
Maybe you want to switch the value argument to use expr= syntax
instead so you can use more built-in values.

Do you mean something like this? This doesn't appear to work :-(

SetEnvIf Request_URI "(.+)\.pdf$" PDF_CANONICAL_URL=$1\.pdf
Header always set Link "<%{HTTP_HOST}e%{REDIRECT_PDF_CANONICAL_URL}e>; rel=\"canonical\"" expr=%{REQUEST_URI} =~ m#(.*)pdf$#"

This is from the example provided in the docs

https://httpd.apache.org/docs/2.4/mod/mod_headers.html



[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