我重新曾经是一个.NET网站Apache服务器上使用WordPress一个新的网站,旧网页网址是这样的:如何重定向Page.aspx =
Page.aspx?p=70
我需要301重定向的所有页面到新的漂亮的URL中使用的.htaccess
当我使用
Redirect 301 /Page.aspx?p=70 http://example.com/foobar
它不工作,和WordPress将其发送到
/?attachment_id=70
我的.htaccess看起来像这样
Redirect 301 /Page.aspx?p=70 http://example.com/foobar
# 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
请分享您的整个.htaccess – Bjorn 2014-09-18 19:42:22
@Bjorn我已经添加了.htaccess现在 – user2520794 2014-09-18 20:06:03