2
我有一個需要只有主頁有以下文件匹配.pdf文件需要問在打開之前需要問的,但其他.pdf文件在網站(不在主頁上)我想要自動打開。這是完成這個最好的方法嗎?<filesmatch>只有一個頁面
這是一個WordPress的網站,最新版本,主頁是一個集頁面。此外,該網站的所有者可以在網站中添加更多的.pdf鏈接,所以我不想在每次添加文件時都必須操縱代碼的地方使其複雜化。
這裏是什麼是目前在我的.htaccess文件:
# Use PHP5 as default
AddHandler application/x-httpd-php5 .php
ErrorDocument 404 /index.php
ErrorDocument 403 /index.php
#BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.dramanotebook.com/$1 [R,L]
<Files 403.shtml>
order allow,deny
allow from all
</Files>
<FilesMatch "\.pdf$">
ForceType applicaton/octet-stream
Header set Content-Disposition attachment
</FilesMatch>
# END WordPress
由於提前, 吉姆
這是否意味着沒有人有任何建議?我應該繼續前進嗎?大聲笑 – Jim 2013-03-26 03:03:23