0

It's probably the simplest thing on earth, but I don't know how to do this.

I know how to do this:

RewriteRule ^user/(.*)$ index.php?page=profile&id=$1 [L] 

which will display: example.com/user/morten

I would like to "cut out" user/, so that the domain will look even nicer for my users. Like this:

example.com/morten

How do I do this?

Thank you.

Niels Hermann
  • 562
  • 2
  • 5
  • 13
  • So you want to remove the `user/` part? Have you tried to remove `user/` from your regex? – Ron van der Heijden Mar 14 '18 at 13:55
  • If you do it this way, then you want to add RewriteCond(s) that first of all check whether what was requested maps onto an existing file or folder. – CBroe Mar 14 '18 at 13:55

0 Answers0