2010-11-18 17 views
0

URLに特定の変数が含まれている場合、次の規則が適用されないように、.htaccessファイルにどのように追加できますか?単純なURLの書き換え

# Options All 
# Options -Indexes 
# 
# RewriteEngine on 
# 
# RewriteCond %{HTTP_REFERER} !^$ 
# RewriteCond %{HTTP_REFERER} !^http://(www\.)?example.com/.*$ [NC] 
# RewriteRule (.*)$ /shared/php/v1/hotmusiclink.php?p=$1 [L] 

# AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi 
Options -ExecCGI 

上記の彼らは、URLの文字列?コード= s0mec0deに

感謝:)

答えて

1

を持っていない限り、あなたは適用されない任意の書き換えを行うことがのRewriteCondを使用することができ、hotmusiclink.phpするすべてのURLをリダイレクトする必要があります。

RewriteCond %{QUERY_STRING} !code=s0mec0de 
RewriteRule ^.*$ /hotmusiclink.php 

動作するまで再生します。