How do I redirect (301) URLs that are random like /search.php?tag=Classy using .htaccess method. I tried below one which didn't work.
Redirect 301 /search.php?tag=Classy http://www.domain.com/tag/classy/
How do I redirect (301) URLs that are random like /search.php?tag=Classy using .htaccess method. I tried below one which didn't work.
Redirect 301 /search.php?tag=Classy http://www.domain.com/tag/classy/
リダイレクト ルールは問題ないようです。これが Web サイトのルートにある .htaccess である限り、それが見つかるはずです。ただし、Apache のインスタンスでmod_aliasモジュールが有効になっていることも確認する必要があります。
先ほど間違えましたが、はい、RewriteRules がある場合は、次のものが必要になります。
Options +FollowSymLinks
RewriteEngine On
..そして、あなたは書き換えが実際に機能していると述べました。
もう 1 つの可能性は、リライトがリダイレクトと重複していることです。mod_rewrite ディレクティブは、.htaccess の順序に関係なく、mod_alias の前に実行されます。