2012-02-14 6 views

答えて

2

サイトのルートディレクトリにある.htaccessファイルに次を追加してみてください。 これはただ一つの質問、してください、あなたは気にしない場合はHTTP/S用

RewriteEngine on 
RewriteBase/

#if the request only has q=home 
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /\?q=home\ [NC] 
# then add Rewrite rule here 
+0

に動作します...あなたは "^ [A-Z] {3,9} \" の意味を説明してくださいもらえますか?私はそれを見つけることを試みたが、Googleはそのような質問をスキップする。ありがとうございました。 – Haradzieniec

+0

@Haradzieniec '^ [A-Z] {3,9} \'はどんなHTTP動詞、すなわち 'GET'、' POST'、 'DELETE'などとマッチしますhttp://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods –

3

ザ・、唯一www.mydomain.com/?q=whateverstring

RewriteCond %{REQUEST_URI} ^/$ 
RewriteCond %{QUERY_STRING} ^q=([^&]+)$ [NC] 

のために処理しなければならないあなたは上記の後に好きなRewriteRule追加します。

関連する問題