繁体   English   中英

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

[英]301 Redirect in .htacess file produces 500 error page

我正在尝试让我在WordPress中的301重定向正常工作。 我做到了这一点,而没有在以前的Wordpress网站上遇到任何问题。 这是我目前在检查主要网站而不仅仅是重定向时产生500错误页面的内容。

谢谢您的帮助!

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

尝试将整个Rediret 301规则更改为

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

在这里查看进一步的结帐。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM