.htaccess - How to make Apache rewrite blog URLs? -


i've installed wamp, made alias, , put folder ".htaccess" file. goal have url such "foo.com/blog/bar-baz" internally call "display.php?name=bar-baz". among various things tried following:

rewriterule ^blog/(.+)$ display.php?$1 

however, gives "the requested url /users/.../public/display.php not found on server". playing around able work:

rewriterule ^blog.php$ /personal/display.php 

advice appreciated.

you can try rule root .htaccess:

rewriteengine on  rewriterule ^blog/(.+)$ /personal/display.php?name=$1 [l,qsa,nc] 

Comments

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -