Forum Moderators: phranque
# BLOCK APPLE apple-touch-icon REQUESTS
<FilesMatch "apple-touch-icon-precomposed\.png|apple-touch-icon\.png|apple-touch-icon-120x120-precomposed\.png|apple-touch-icon-120x120\.png|apple-touch-icon-152x152-precomposed\.png|apple-touch-icon-152x152\.png">
Order allow,deny
Deny from all
</FilesMatch> # For APPLE apple-touch-icon REQUESTS
RedirectMatch 301 (?i)/apple(-touch-icon-.*)?.png /apple-touch-icon.png <FilesMatch "apple-touch-icon-precomposed\.png|apple-touch-icon\.png|apple-touch-icon-120x120-precomposed\.png|apple-touch-icon-120x120\.png|apple-touch-icon-152x152-precomposed\.png|apple-touch-icon-152x152\.png">
<FilesMatch "apple-touch-icon[^.]"> What I see in the logs isYes. Now pull the error log for the same time period--they should be saved in the same place as server access logs, though most people rarely look at them--and see what it says for this request. You should find the IP and the timestamp; the rest of the error log gives slightly different information.
[Mon Jun 11 18:27:50 2018] [error] [client 65.154.cc.dd] File does not exist: /full-physical-filepath-here/images/m-main417.png
99.xxx.xx.xxx - - [13/Jun/2018:22:04:39 -0500] "GET /apple-touch-icon.png HTTP/1.1" 301 257 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36 OPR/53.0.2907.68"
RedirectMatch 301 (?i)/apple(-touch-icon-.*)?.png /apple-touch-icon.pngDo you use mod_rewrite at all? (It's pretty hard not to.) If so, you need to change all mod_alias redirects (Redirect by that name) to mod_rewrite syntax, and put them in the appropriate order.
The next request after the 301 (which was me) is for another IP for another file that was 200'd. When I tried to request the file "apple-touch-icon.png" I see it in my browser, but saw it as 301 in the log. (that is really weird, no?)
The next request after the 301 (which was me) is for another IP for another file that was 200'd. When I tried to request the file "apple-touch-icon.png" I see it in my browser, but saw it as 301 in the log. (that is really weird, no?)
BTW, ArchStanton, welcome to Webmasterworld, and thanks for the stimulation!
Aside: 404s are not a bad thing, and are also very easy to strip out of logs. Just asking why....
Your canonicalization rewrite would come after the apple-touch-icon rule, so no it is not weird, if you requested with a different protocol than your canonicalization rule provides. In other words, if your request was for https://example.com/apple-touch-icon.png and you're rewriting that to https://www.example.com/apple-touch-icon.png then you would expect to see the 301 response.
Now if you send all visitors to https://www.example.com and requested the icon as https://www.example.com/apple-touch-icon.png then, yes it is weird.
look further down in your server access log (after the 301 from your IP) and you should find a subsequent 200 response logged from your IP address.
what does that show?
99.xxx.xx.xxx - - [14/Jun/2018:21:12:05 -0500] "GET /apple-touch-icon.png HTTP/1.1" 301 257 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36 OPR/53.0.2907.68"