php - How to implement example.com/username -


how websites deal with:

example.com/username?

for example if have page called "about", example.com/about, , user signs username about, happens? trying access example.com/about sent either user's page or page, depending on configuration.

do websites forbid usernames of existing pages about, index, etc? happens if website wants add new page help, , user has signed name?

here's rule have far:

rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*) user.php?username=$1 [nc,l] 

and excluding reserved uris:

rewritecond %{request_uri} !^/user.php [nc] rewriterule ^((?!index|upload|foo|bar).+) user.php?username=$1 [nc,l] 

then in application, disallow names index, upload, foo, bar, ....

what's correct way deal this?


Comments