例えば、上のようなクエリ付きのURLを、下のような静的URLで表示させたいです。
.htaccessのRewriteRuleに正規表現で設定するのだと思いますが、書き方が分かりません。
http://example.com/directory/index.php?12345
↓
http://example.com/directory/mypage12345
下記のように書いてみましたが、クエリがそのまま表示されてしまうし、googleにもリダイレクトされません。
RewriteEngine On RewriteRule ^/directory/mypage([0-9]+)$ /directory/index.php?$1 ErrorDocument 404 http://www.google.com/
Xサーバーです。
どうすれば良いのでしょうか?どなたか教えてください。
回答2件
あなたの回答
tips
プレビュー