在 Drupal 6 中,我需要为丢失的图像发送状态 410 而不是 404。例如,我有一个图像链接https://www.example.com/our-locations/directory/sub-directory/files/xyz.png
不再存在于该位置,那么我需要发送状态 410 而不是 404。
我已经尝试过的解决方案是:
RewriteCond %{REQUEST_URI} ^our-locations/directory/sub-directory/files/(\.jpg|\.png)$ [NC]
RewriteRule ^(.*)$ - [NC,R=410,L]