2012-01-03 8 views

答えて

1

RewriteRuleディレクティブからクエリ文字列を取得することはできません。 あなたはまた、「HTTP:///www.yourdomain.com/page.php」リダイレクトされ

#if query string has var=val 
RewriteCond %{QUERY_STRING} var=val [NC,OR] 
#or it just has ? with no query string 
RewriteCond %{THE_REQUEST} page\.php\?\ [NC] 
#and resource is page.php serve 404 
RewriteRule ^page\.php$ /404.shtml [R=404,L,NC] 
+0

を使用var=val?(空のクエリ文字列)を検出したい場合は、私はちょうどのhttp「のためにしたい:// /www.yourdomain.com/page.php? "それに "?"最後に – Arif

+0

@Arifは上記の編集を試してください –

関連する問題