Answer the question
In order to leave comments, you need to log in
Where can I get a list of reserved pages?
I want to use user logins in the first level of the project, as GitHub or VK.com does.
Example: https://example.com/userlogin
The problem is that the project also has regular pages
https://example.com/about
https://example.com/news
, etc.
Accordingly, you need to create a list of exceptions from existing pages and physical directories (js, css, images, swf) located in the root of the project.
It is clear that everything cannot be foreseen for the future, which is why the question actually arose.
Maybe someone has already eaten this cactus, or knows where such lists can be taken?
PS
Having run through one of the vk topics, in which links to existing pages and files are posted, I copied the innerHTML of the page, parsed all the hrefs and ran them through vk.api to separate pages from "domains". It turned out such a list . But in it, by any means, not everything.
Answer the question
In order to leave comments, you need to log in
Having studied the practice of large projects, I came to the following conclusion in order to implement the planned structure, it is required:
In his project, from spec. characters, I will only allow the use of the dash sign. Something like this regular expression meets the necessary conditions:
/^(?=.{4,32}$)(?![-])(?!.*[-]{2})[a-zA-Z0-9-]+([^-])$/
|__________||_____||__________||__________| |____|
| | | | |_ запрет «-» в конце логина
| | | |_ разрешенные символы
| | |_ запрет «-» 2 раза подряд
| |_ запрет «-» в начале логина
|_ длина логина от 4 до 32 символов
With such an organization, I see the following options.
1) Move everything "non-custom" to a subdirectory like:
https://example.com/site/news/
https://example.com/site/images/
and then only "site" will need to be filtered
2) Same as point 1, but put it on the site.example.com/news/ subdomain
3) Make user directories like example.com/~username/ or example.com/user-username/
4) Issue users on the userlogin.example.com subdomain
Choose any - everything will work.
Take twitter for example - there are five pages left in the root on the main domain, the rest is either in the /i/ subdirectory or on subdomains.
1st option:
Initially create an exclusion list for usernames (be it jobs, wiki, about, news, etc.). If you need to add something - you can always come up with synonyms. /billing could be /payment, for example.
Option 2:
Prohibit usernames shorter than 4 characters, and place service pages on 3 characters. If it seems to you that 3 characters are not enough, then 26 (English alphabet) + 10 (numbers) ^ 3 = 46k+ options. And that's not counting 1-character and 2-character ones.
3rd option:
Combine the first two options. Those. put three characters for future pages, and /about to the exclusion list
4th option:
https://example.com/u/userlogin- reddit style. But it is logically more correct to put users on separate slashes
What came to mind in 2 minutes.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question