1
I would like an example of how to create a folder to store each user’s data in php, for example www.facebook.com/nomedeusuario
I imagine that in the sequence an index is saved inside this folder and this index is created at the time of registration, with the user information as in Facebook. Could someone give me an example of how to do this?
This is not folder. This can best be called the Friendly URL. Facebook can use the
/qualquercoisa
forprofile.php?id=qualquercoisa
. Yes, both are accessible! You can see about it here: http://answall.com/questions/25985/url-amig%C3%a1vel-com-htaccess, but complex, or here: http://answall.com/questions/75963/url-amig%C3%a1vel-utilizing-htaccess/75970#75970.– Inkeliz
It is not folder is url friendly, look at this example. And read more here
– Ivan Ferrer
Another way to rewrite, without using
mod_rewrire
is to pass variables after the index.php file, example:www.seusite.com.br/index.php/pergunta/resposta
and capture the URL and separate everythingexplode()
"index.php/"
.– Ivan Ferrer
@Ivanferrer even, if you set up Apache (or equivalent) for this, you don’t even have to be index.php. It may very well be
http://example.com/noticias/esporte
- is what I normally do. I don’t use htaccess and simplify the whole process.– Bacco
to ligado @Bacco!
– Ivan Ferrer