I have direcotry /books/ and i want put Canonical header for every file:
Trying dynamic variables in VHost -> Context -> Static -> Header → I attempted using $0, $URI, $REQ_URI, and %{REQUEST_URI}, but none of them worked. For example:
Also:
Can somethig help me or give some recommendations / tips?
Code:
HTTP/1.1 200 OK
Content-Length: 19
...
Link: <https://www.example.com/downloads/white-paper.pdf>; rel="canonical"
...
Link: <https://kr-labs.com.ua/books/$0>; rel="canonical"
Also:
Code:
RewriteCond %{REQUEST_URI} ^/books/(.*\.pdf)$ [NC]
RewriteRule .* - [E=CANONICAL_URL:https://kr-labs.com.ua/books/%1]
Header set Link "<%{CANONICAL_URL}e>; rel=\"canonical\""
Can somethig help me or give some recommendations / tips?