1

URLを角かっこでリダイレクトする方法を知っている人はいますか? しばらく前に間違いを犯し、その後適切な URL 形式に変更しましたが、URL 付きのリンクは Google にインデックスされたままです。

次のことを試しましたが、どれも機能していないようです

RewriteRule ^url-with-(brackets)(.*)$ http://url.com/url-with-no-brackets$1 [R=301]

RewriteRule ^url-with- \brackets\ (.*)$ http://url.com/url-with-no-brackets$1 [R=301]

前もって感謝します。

4

1 に答える 1

0

Give this a try:

RewriteRule ^(.+)\((.+)\)(.*)$ /$1$2$3 [R=301,L]

This will extract the entire text without the parenthesis.

Keep in mind that you may have been cached from previous attempts since you are using 301 so I recommend you that you test it using a different browser just to make sure its working.

于 2013-09-22T14:18:13.430 に答える