Options +FollowSymLinks
RewriteEngine on
RewriteRule ^readnews/([0-9]+)\.html$ readnews.php?news_art_id=$1
これは機能しますが、画像が壊れます。mod_rewriteルールの後の不要な.html拡張子
imagesフォルダは、URL http://localhost/newsdev/images
より前のディレクトリにありますが、書き換え後はhttp://localhost/newsdev/readnews/123.html
となります。
.html
を削除するには、どうすればいいですか?
私はhttp://localhost/newsdev/readnews/123
を持っています。
ありがとうございます。どうすればhttp://localhost/newsdev/news.php ----をhttp:// localhost/newsdev/newsに書き換えることができますか? –