php - mod_rewrite for specific url only -
i'm rewriting url in different ways. mean want know how use mod_rewrite can following:
1- convert .php html speific url i.e: www.mydomain.com/news.php www.mydomain.com/news.html
i found interesting codes, not sure 1 works without errors...
some of found:
rewriteengine on
rewriterule ^(\d+)/(\w+).html$ index.php?id=$1&title=$2
2- convert sub url of news.php file
news.php?do=news&id=24455
so topics or threads show without slashes /
i find 2nd question lot difficult, sure there must solution that.
any idea how both questions done specific url stated above...!!
thanks
convert .php html speific url i.e: www.mydomain.com/news.php www.mydomain.com/news.html
rewriterule ^news\.html$ /news.php guess second (assuming want rewrite /news/foo.html urls):
rewriterule ^news/(.*)\.html$ /news.php?id=$1
Comments
Post a Comment