我重新曾經是一個.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