新的htaccess ...儘管404存在所有文件。這一個文件夾中有實際的50多個圖像,但3圖像得到一個斜槓添加到最後。htaccess添加結束斜槓到一些圖像,而不是其他人
不工作:
http://shawnrieger.dev/img/photography/small/20100402153906_s.jpg/ http://shawnrieger.dev/img/photography/small/20140404123054_s.jpg/ http://shawnrieger.dev/img/photography/small/20130330110114_s.jpg/
工作的一個示例:
http://shawnrieger.dev/img/photography/small/20160913190428_s.jpg http://shawnrieger.dev/img/photography/small/20120613091849_s.jpg http://shawnrieger.dev/img/photography/small/20120713102800_s.jpg
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^privacy-policy/$ /parts/pages/privacy-policy.php
RewriteRule ^project/([^/]+)/$ /parts/pages/project.php?id=$1
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)$ /$1/ [R=301,L]
<IfModule mod_headers.c>
# WEEK
<FilesMatch "\.(jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=2592000"
</FilesMatch>
# WEEK
<FilesMatch "\.(js|css|swf)$">
Header set Cache-Control "max-age=2592000"
</FilesMatch>
</IfModule>
htaccess很混亂。謝謝,這很好。我會嘗試閱讀更多關於這個主題。 – shwnrgr