【问题标题】:What are some good username / vanity url rules?有哪些好的用户名/虚名 url 规则?
【发布时间】:2011-09-05 02:50:15
【问题描述】:

这不是关于“如何”,而是“如何最好”。

我了解大多数带有虚 URL 的网站都有基本规则:

  • >4 个字符(涵盖了许多有用的标记,如“博客”和“工作”,还有一长串“4 字母词”)
  • 从 alpha 开始
  • 仅限字母数字(也可能是 ._-,但 user.name 与用户名相同)
  • 禁止使用保留字以防止滥用和避免混淆(例如:contact、about、username、vanityurl、[还有哪些其他词?])

对于添加虚 URL 的网站,还需要考虑哪些其他重要规则?

应保留哪些常用词以防止混淆或滥用?

【问题讨论】:

  • 这个问题得到了一些反对票。有人可以帮忙解释一下原因吗?
  • 也许是因为这不是具体的编程问题,而且可能与 SO 无关。

标签: url dns naming-conventions vanity-url


【解决方案1】:

我将开始发布我目前发现的内容。

设置字符限制 >4 个字符

必须至少包含一个 alpha [a-z]

可选特殊字符:._-

  • 特殊字符不应计入不同的标记(即user.name = username
  • 特殊字符也不能同时使用(例如user..name
  • 特殊字符不应开始或结束令牌(例如-user-name-.username-
  • 更新: Facebook 和 Twitter 也不允许使用破折号。考虑排除。
  • Gmail 只允许使用点。

通过防止相似字符避免字符混淆 l,1, o0

  • 例如,如果colbert已注册,则防止co1bertc01bert也被注册

不区分大小写

保留字列表

about, aboutus, account, accounts, add, admin, administer, administrator, admins, ajax, anon, anonymous, apache, api, app, apps, archive, archives, article, articles, auth, authenticate, authentication, author, backup, better, blog, blogger, cache, careers, cart, changelog, checkout, client, clients, codereview, compare, config, configuration, connect, contact, contactus, contributor, cpanel, create, css, daemon, data, database, deal, deals, delete, director, direct_messages, docs, documentation, download, downloads, edit, editor, email, emailus, employment, enterprise, explore, facebook, faq, faqs, favorites, feed, feeds, fleet, fleets, follow, followers, following, font, fonts, forum, forums, friend, friends, friending, ftpuser, games, gist, group, groups, guest, help, home, host, hosting, hostmaster, http, httpd, idea, ideas, image, images, include, includes, index, indexes, info, invitation, invitations, invite, is, it, job, jobs, json, lib, library, list, lists, login, logout, logs, mail, map, maps, master, mine, mis, misc, miscellaneous, moderate, moderator, module, modules, mysql, news, nobody, node, nodes, oauth, oauth_clients, offers, office, openid, operate, operator, oracle, order, orders, organizations, owner, password, passwords, plans, poll, polls, popular, post, postgres, postmaster, president, privacy, profile, profiles, projects, public, put, pwnd, pwned, pwnage, question, questions, qwerty, rdf, recruit, recruiter, recruiters, recruitment, register, registrar, registration, remove, replies, root, rss, sales, save, save, script, scripts, search, security, server, service, sessions, settings, shell, shop, signup, signout, sitemap, spam, ssl, ssladmin, ssladministrator, sslwebmaster, stat, stats, statistics, status, stories, student, styleguide, subscribe, support, supporter, survey, surveys, sysadmin, template, templates, terms, test, tester, testing, tests, testuser, theme, themes, tour, tomcat, translations, trends, tutorial, tutorials, twitter, twittr, unfollow, unsubscribe, url, update, upload, uploads, user, users, video, videos, weather, webadmin, webmaster, widget, widgets, wiki, www, wwww, xfn, xmpp, yml, yaml

【讨论】:

    【解决方案2】:

    在谈论虚 URL 时,请记住两件事。如果您提供面向产品的网站,请优化 URL 中的产品名称。或者,如果您的网站类似于社交网络,则优化深层链接中的用户名、社区名或组名。

    http://hioxindia.com/checkAvailability.php

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-07
      • 1970-01-01
      • 1970-01-01
      • 2017-05-07
      相关资源
      最近更新 更多