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