redirect - Redirecting from wp-content?

For some reason, Google has picked up a PDF version of one of our articles from wp-content and ranked it for one of our

For some reason, Google has picked up a PDF version of one of our articles from wp-content and ranked it for one of our higher-value keywords. I'm looking to redirect that PDF link to a link for the original article, but I can't seem to get the Redirect plugin working for the wp-content URL.

If you have any ideas for how I could redirect from the wp-content PDF url to the original article URL, I'd really appreciate it. Thanks!

For some reason, Google has picked up a PDF version of one of our articles from wp-content and ranked it for one of our higher-value keywords. I'm looking to redirect that PDF link to a link for the original article, but I can't seem to get the Redirect plugin working for the wp-content URL.

If you have any ideas for how I could redirect from the wp-content PDF url to the original article URL, I'd really appreciate it. Thanks!

Share Improve this question asked Aug 22, 2019 at 23:34 Aaron MarsdenAaron Marsden 1011 bronze badge 1
  • That's because the request is served directly from disk if it exists as a file, and only given to WordPress to process if the path doesn't match a file or directory. The usual Apache config for this is RewriteCond %{REQUEST_FILENAME} !-f – Rup Commented Aug 23, 2019 at 7:16
Add a comment  | 

1 Answer 1

Reset to default 3

If you have access to your .htaccess file, try the following RewriteEngine On RewriteRule ^(Your_Artile_Name)\.pdf your_article.php [L,R=301] Substituting your actual file names for 'Your_article_name' and 'your_article'.

If you have a Microsoft server, this article explains how to convert .htaccess to web.config

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745223558a4617357.html

相关推荐

  • redirect - Redirecting from wp-content?

    For some reason, Google has picked up a PDF version of one of our articles from wp-content and ranked it for one of our

    6小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信