.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

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -