htaccess 301 redirects for documents NOT pages
I'm using WordPress and I have a PDF and a Word document on my server, both documents are now out of date but are highly ranked on Google.
Is it possible to use a 301 redirect on a document? I have used 301 redirects in the past to point old URLs to new one's but have never come across this situation of using it with a document.
I'm not even sure it is permissible to do this. If not any suggest开发者_JAVA技巧ions on how I should go about this problem?
Redirect 301 /wp-content/uploads/2010/10/oldfile.pdf http://example.com/sub-directory/newfile.pdf
Try
Redirect 301 /old.doc http://www.example.com/
Redirect 301 /old.pdf http://www.example.com/
Update
I use the following for a WordPress blog I worked on
RedirectMatch 301 /old\.pdf(.*) http://www.example.com/$1
精彩评论