php - URL Rewriting Question in Apache -


i doing php project not @ url_rewrite module in apache , wanna learn how achieve kind of url rewrite here:

http://www.something.com/press/release/something_1/ 

01 id of press_release part dynamic part. something dynamic not included in query_string part. url converted 1 below:

http://www.something.com/press/release/press_detail.php?rid=1 

can show me how write url_rewrite rule conversion.

place following in .htaccess file in web root:

rewriteengine on rewriterule ^press/release/.*_(\d+)/?$ press/release/press_detail.php?rid=$1 [qsa] 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -