Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Deep linking to /files
I would prefer that the downloads in /files not be directly accessible, so I did as outlined in the Textpattern installation instructions and renamed the .htaccess file that is intended to prevent this. However, the files there are still appearing in google, and clicking on the google links downloads the files. Does that mean that the “RedirectMatch 403 .*” line in .htaccess does not work as intended?
I assume that my only fallback is to move the /files directory elsewhere.
Last edited by skewray (2013-05-27 18:53:42)
Offline
Re: Deep linking to /files
How about using a directive in your robots.txt file to stop search engines from indexing the files directory?
Try this:
User-agent: *
Disallow: /files/
Offline
#3 2013-06-04 19:01:32
- ax
- Plugin Author
- From: Germany
- Registered: 2009-08-19
- Posts: 165
Re: Deep linking to /files
You may effectively prevent this by using the smd_access_keys
plugin that will generate a token required for download. For example, create a form named “files” with this content:
<txp:variable name="key">
<txp:smd_access_key url='<txp:file_download_link />' trigger="file_download" />
</txp:variable>
<p><a href="<txp:variable name='key' />"><txp:file_download_name title="1" /> [<txp:file_download_size format="auto" decimals="1" />]</a><br /><txp:file_download_description /></p>
then use this form in the download link, or in a list of downloadable items:
<txp:file_download_list category='<txp:category />' form="files" sort="description" wraptag="ul" break="li" limit="99" />
Last edited by ax (2013-06-04 19:13:04)
Offline
Re: Deep linking to /files
This is perfect. I have some download categories that I would like to block and other not.
Offline
Pages: 1