2

Is there a possibility. Change the link like this:

www.example.com/user?u=Username to => www.example.com/user/Username

But still with PHP to recognize by which user it is. Best without extra pages to create?

Jay Blanchard
  • 34,243
  • 16
  • 77
  • 119

2 Answers2

1

As I commented above you should use Url rewriting : For exemple put this in the root of your website under the name .htaccess

Options +FollowSymlinks
RewriteEngine on
RewriteOptions Inherit
RewriteRule ^/?user/([A-Za-z]+)$  user.php?u=$1  [L]
kaldoran
  • 845
  • 6
  • 19
  • Then please mark the question as solved by my answer.By the way, the "?" before the "/" mean that the "/" is optional :) – kaldoran Mar 09 '17 at 14:47
  • Done! Thx a Lot kaldoran and the rest! Little hint: If you have Relative Paths you have to add a ../ Because the file now thinks it is in the orderner user –  Mar 09 '17 at 14:51
0

Thanks for your help all together. This has worked:

RewriteEngine On
RewriteRule ^/?user/([A-Za-z0-9]+)$ user.php?u=$1

Little hint: If you have Relative Paths you have to add a ../ Because the file now thinks it is in the folder user