.htaccess - Remove the profile.php?name=Username from url and replace with profile/Username -
this question has answer here:
i have problem php file. want make site , have url this
domain.com/players/username
i have folders set this: domain.com/players/players.php?username=johndoe
inside main folder (domain.com/players/index.php) have search form posts players.php file want make able search player username
so -> remove /players.php?username=johndoe , change /players/johndoe user can view profile @ domain.com/players/johndoe
thank , sorry if bad question
something should trick,
<ifmodule mod_rewrite.c> # turn on engine: rewriteengine on # set base directory: rewritebase /username/ # redirect paths player.php: rewriterule ^(username)/?$ players.php?username=$1 </ifmodule>
this htaccess file, have make sure mod_rewrite enabled on server's httpd.conf file.
hopefully gets going in right direction.
Comments
Post a Comment