1

私のブログの URL には、次のようなものがありました。

www.miblog.com/post-name/1.html
www.miblog.com/post-name-two/2.html
www.miblog.com/other-post/3.html

パーマリンクを次のように変更しました

www.miblog.com/post-name/
www.miblog.com/post-name-two/
www.miblog.com/other-post/

olds url から news url への 301 リダイレクトを入れたいです。htaccessでできますか?

ブログはワードプレスで運営しています。

ありがとう。

4

1 に答える 1

1

このコードを他のすべてのルールの上に置きます。

RewriteRule ^(.+?)/[^.]+\.html$ $1/ [L,NC,R=301]
于 2013-08-19T13:24:27.797 に答える