Friendly URLs and folder structure

0

I am developing a system for ordinary users (these do not need to log) and users with permissions (registered in the bank).

  

Let's assume that the system is to register phone numbers and that ordinary users use this site to make queries in numbers, how would it work:

Common user accesses listatelefone.com (index.php) choose your city and the system redirects that user to cidade.php via the chosen city ID.

Trying to offer the user friendly URLs, the idea would be:

www.listatelefone.com/ (index.php)
www.listatelefone.com/Nomedacidade (aqui seria o arquivo cidade.php)
  

As for the restricted part, assuming that the user with permission has a "restricted" homepage and pages to register phones with image file uploads, what would be a good way to organize this in the URL and folder directory so that the result would be www.listatelefone.com/restrito/ on this home page and consequently www.listatelefone.com/restrito/cadastro ?

For this I could create a folder .../restrita/ and add the file cadastro.php in there? or are there different and more interesting ways to accomplish this?

Forgetting just the URLs and going to the organizing part of uploads and processing files ( valida_form.php for example) I thought about creating a Upload folder, where for example, inside that folder, would have .../imgs/cadastro/ (on this page would be included the images of the cadastre) whereas to save files of processing, would be in some folder like .../processos/ .

And finally, the files .css , .js , among others - these I thought of putting each one in their respective folder, for example:

.../css/arquivos.css
.../js/arquivos.js
  • How do I have friendly URLs and follow the structure I've listed?
asked by anonymous 24.06.2017 / 00:29

0 answers