Canonical Header Links for PDF and Image files in .htaccess
问题 I'm attempting to setup Canonical links for a number of PDF and images files on my website. Example Folder Structure: /index.php /docs/ file.pdf /folder1/ file.pdf /folder2/ file1.pdf file2.pdf /img/ sprite.png /slideshow/ slide1.jpg slide2.jpg Example PDF URL to Canonical URL: http://www.example.com/docs/folder1/file.pdf --> http://www.example.com/products/folder1/ I am trying to avoid having to put individual .htaccess files in each of the sub-folders that contain all of my images and PDFs.