简体   繁体   English

指向用户页面的用户URL

[英]User URL that points to user page

How would you go about generating unique user URL's such as Facebook and Twitter have. 您将如何生成Facebook和Twitter等独特的用户URL。 For example, if I go to twitter.com/aggot my page appears. 例如,如果我转到twitter.com/aggot,则会显示我的页面。

Would this system generate a unique user page on the server or is it re-directing? 这个系统会在服务器上生成唯一的用户页面还是在重定向?

如果您使用apache或您使用的Web服务器的某个类似模块,则全部与mod_rewrite有关。

(new) Twitter uses JavaScript, but the Easiest solution would be to use .htaccess to redirect to something like `/users.php?id=. (新)Twitter使用JavaScript,但最简单的解决方案是使用.htaccess重定向到`/users.php?id=之类的东西。 You can do this without unmasking the true URL. 您可以在不隐藏真实URL的情况下执行此操作。 Take a look ad mod_rewrite for Apache. 看一下Apache的mod_rewrite广告。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM