I am working on a new website bud I want to create a nice looking urls for my users. I don't know anything of htaccess
and could not find my solution on google.
I need to link:
user.mywebsite.com
to>>mywebsite.com/users/user
user2.mywebsite.com/contact
to>>mywebsite.com/users/user2/contact
Some links may not be linked like:
www.mywebsite.com
may not link tomywebsite.com/users/www
Is this possibe to do with htaccess
?
If yes can someone explain it to me?
Using mod_rewrite, you can try:
This will make it so when someone enters http://joe.mywebsite.com/some/page.html they will be served the file in /users/joe/some/page.html
You can take a look at VirtualDocumentRoot
Redirecting your old links to new ones.