- 2011/01/08 22:40
- Linux
先日、動的で組み込んだ「mod_rewrite」
静的でも出来る!と調べてたサイトに書いてあった。
# ./configure –prefix=/usr/local/apache –enable-so –enable-rewrite
# make
# make install
▽httpd.conf直書き
Apacheのhttpd.conf修正
RewriteEngine On
RewriteRule ^/([0-9a-zA-Z_\-]+)\.html$ /index2.php [L]
※index.html → index2phpへリライト
▽htaccess用
Apacheのhttpd.conf修正
AllowOverride All
※Allに変更。じゃないとhtaccessが無効になる。
htaccessに
RewriteEngine On
RewriteRule ^/([0-9a-zA-Z_\-]+)\.html$ /index2.php [L]
これでOK・・・のはず。
- Linux – iptablesの設定 – さくらVPS
- Linux-チューニング-さくらVPS
この記事を読んだ人は次のエントリも読んでいます。
コメント:0
トラックバック:0
- この記事のトラックバック URL
- http://seo.gunpla-rev.net/blog/linux/linux-%e9%9d%99%e7%9a%84%e5%8b%95%e7%9a%84%e3%80%8cmod_rewrite%e3%80%8d%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b%e3%80%82-%e3%81%9d%e3%81%ae2/trackback/
- トラックバックの送信元リスト
- Linux-静的/動的「mod_rewrite」を使ってみる。 その2 - 携帯アフィリエイトで稼ぐアフィリエイトSEO より