it’s been a very very long while since i did anything in PHP.
Would anyone care to explain how to achieve such effect:
i go to mydomain.com/user/peter
and get a customized user page for this username ‘peter’
can it work such that peter gets piped to some php script that generates page for user parameter? it kind of works like passing parameter via url but looks nicer, how is this thing called?
(i know that this sounds weird but i’m sure you advanced php coders will know what i’m asking about)
If using Apache, mod_rewrite can solve this:
If in an .htaccess file in the root:
See the docs for mod_rewrite.
You can also enable MultiViews and then those requests will be mapped to
user.phpautomatically. You can access the value afteruserwith$_SERVER['PATH_INFO]`:See the docs for content negotiation.