.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
Post a Comment