【Apache】mod_rewriteについて語るスレ (686レス)
【Apache】mod_rewriteについて語るスレ http://medaka.5ch.net/test/read.cgi/php/1023791370/
上
下
前
次
1-
新
通常表示
512バイト分割
レス栞
676: nobodyさん [sage] 2017/08/20(日) 11:33:24.34 ID:??? こんにちは。スレ誘導されて来ました。 www統一についてはGoogleで沢山引っかかるのですが、 下記の問題については全然出てこないので、質問させて頂きます。 ----- www・index無しを.htaccessでリダイレクトして統一したいと思い、 以下を.htaccessに書き加えました。正常に動作しましたが、以下のように なってしまい困っています。ファイルの拡張子が書き加えられてしまいます。 http://○○○.jp/××× ↓(にwwwを書き加えて飛ぶと) http://○○○.jp/×××.html できれば上記のように拡張子を書いていない場合はwwwを付け加えても ファイルの拡張子なしでの表示をしたいのですが、それは可能でしょうか? 使っているサーバーはさくらのスタンダードプラン・ファイルの属性は604です。 是非、知恵をお借りしたいです。よろしくお願い致します。 ----- RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.○○○\.jp$ RewriteRule ^(.*)$ http://○○○.jp/$1 [R=301,L] RewriteCond %{THE_REQUEST} ^.*/index\.html RewriteRule ^(.*)index.html$ http://○○○.jp/$1 [R=301,L] http://medaka.5ch.net/test/read.cgi/php/1023791370/676
上
下
前
次
1-
新
書
関
写
板
覧
索
設
栞
歴
あと 10 レスあります
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.006s