0

So I am making an website using php to show users and there post for other site using API .

So I have URL likes mysite.com/user.php?username=demo . So is there any way I can make it mysite.com/user/demo. I made searches here I came to know that Its call URL_rewriting . But as I am newbie to php / apache Can any one will help me in making my .htaccess

my site url now is > site.com/user.php?name=namehere.

any small help will be appreciated thanks .

4

1 回答 1

0

我从中学到了

你可以做

RewriteRule ^user/([A-Za-z0-9-]+)/?$  user.php?username=$1    [NC,L]
于 2013-10-14T08:03:32.653 回答