douhui1630 2014-09-20 14:05
浏览 51

301 .htaccess文件中的重定向会产生500错误页面

I am trying to get my 301 redirects in Wordpress to work. I have done this with out any issues on a previous Wordpress site. Here is what I have current that is producing the 500 error page when I check the main website not just the redirect.

Thanks for the help!

# 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>

# END WordPress

Redirect 301 /images/kids%20menu.pdf http://ww2.landonwinery.com/bistro/bistro-kids-menu/
Redirect 301 /images/landon%20dinner.pdf http://ww2.landonwinery.com/bistro/bistro-dinner-menu/
Redirect 301 /images/landon%20dinner%202014.pdf http://ww2.landonwinery.com/bistro/bistro-dinner-menu/
Redirect 301 /images/landon%20lunch%202014.pdf http://ww2.landonwinery.com/bistro/bistro-lunch-menu/
  • 写回答

1条回答 默认 最新

  • dph19153 2014-09-20 16:02
    关注

    Try changing the whole Rediret 301 rules to

    RewriteRule ^/thefile.html$ /yourdirectory/thefile.html [R=301,L]
    

    Have a look here for the further checkout..

    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度