网址方案和优雅 [英] URLing schemes and elegance
问题描述
Bit OT,但面向PHP的风格问题...
只是想知道你们中有多少人真的使用过像
这样的网址 http://talks.php.net/index.php/Web+Services
您有多少人真正喜欢或发现它优雅? TIA
-
|只是另一个PHP圣人|
电子邮件:rrjanbiah-at-Y!com
Bit OT, but PHP oriented style issue...
Just curious to know how many of you really use the URLs like
http://talks.php.net/index.php/Web+Services
And how many of you really liked or found it elegant? TIA
--
| Just another PHP saint |
Email: rrjanbiah-at-Y!com
推荐答案
R. Rajesh Jeba Anbiah写道:
R. Rajesh Jeba Anbiah wrote:
Bit OT,但面向PHP的风格问题...
只是想知道有多少人真的使用像
http://talks.php.net/index.php /网络+服务
你们有多少人真正喜欢或发现它优雅? TIA
Bit OT, but PHP oriented style issue...
Just curious to know how many of you really use the URLs like
http://talks.php.net/index.php/Web+Services
And how many of you really liked or found it elegant? TIA
不是我。我一直坚持使用mod_rewrite来获取所有我的se friendly
URI。关于它的最好的部分是隐藏技术。毕竟,如果我需要将一个站点切换到jsp,asp或coldfusion,我仍然可以保留
URI,而没有任何人(包括SE)知道我是使用
不同的技术。
即使我在做静态HTML页面,我仍然喜欢使用mod_rewrite
事实上,如果我改变,它将对任何访客或
搜索引擎透明。
-
Justin Koivisto - sp**@koivi.com
PHP海报:请使用comp.lang.php获取与PHP相关的问题,
alt.php *不推荐使用。
Not I. I have been sticking with mod_rewrite for all my "se friendly"
URIs. The best part about it is the hiding of technology. Afterall, if I
have to switch a site over to jsp, asp or coldfusion, I can still keep
the URIs without anyone (including the SEs) knowing that I am using a
different tech.
Even if I am doing static HTML pages, I still like to use mod_rewrite
for the fact that If I change, it will be transparent to any visitors or
search engines.
--
Justin Koivisto - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.
随时我看到index.php或index.html在一个URL我认为他们的网站
家伙必须是一个doofus。
但具体到你的问题..我正在使用类似的东西:
http://talks.php.net/?page=Web+Services
然后回到我的行列......与网址有什么关系
/information/information.html
/ calendar / calendar.html
/contact-us/contact-us.html
等..
笨蛋!
ng**********@rediffmail.com (R。Rajesh Jeba Anbiah)在消息新闻中写道:< ab ************************** @ posting.google。 com> ...
anytime I see "index.php" or "index.html" in a URL I think their web
guy must be a doofus.
But specific to your question.. I''m using something like:
http://talks.php.net/?page=Web+Services
and back to my peeve.. what''s with urls like
/information/information.html
/calendar/calendar.html
/contact-us/contact-us.html
etc..
morons!
ng**********@rediffmail.com (R. Rajesh Jeba Anbiah) wrote in message news:<ab**************************@posting.google. com>...
Bit OT,但面向PHP的风格问题...
只是想知道你们中有多少人真正使用过像
这样的网址< a rel =nofollowhref =http://talks.php.net/index.php/Web+Servicestarget =_ blank> http://talks.php.net/index.php/Web+Services
你们中有多少人真正喜欢或发现它优雅? TIA
Bit OT, but PHP oriented style issue...
Just curious to know how many of you really use the URLs like
http://talks.php.net/index.php/Web+Services
And how many of you really liked or found it elegant? TIA
" Brad Kent" < BK *********** @ yahoo.com>在消息中写道
news:7a ************************** @ posting.google.c om ...
"Brad Kent" <bk***********@yahoo.com> wrote in message
news:7a**************************@posting.google.c om...
随时我看到index.php或index.html在一个URL中我认为他们的网站
家伙必须是一个doofus。
但具体到你的问题..我正在使用类似的东西:
http://talks.php.net/?page=Web+Services
>并回到我的痛苦......与网址有什么关系
/information/information.html
/calendar/calendar.html
/contact-us/contact-us.html <等等..
蠢货!
anytime I see "index.php" or "index.html" in a URL I think their web
guy must be a doofus.
But specific to your question.. I''m using something like:
http://talks.php.net/?page=Web+Services
and back to my peeve.. what''s with urls like
/information/information.html
/calendar/calendar.html
/contact-us/contact-us.html
etc..
morons!
呃,你以前在团队中发展过吗?将文件名保存在URL,
以及使用文件的唯一名称,使其他人更容易理解您的代码。如果页面出现问题,他们所要做的就是
快速浏览一下URL,找到要检查的正确文件。
通过单个脚本过滤所有页面请求是愚蠢的。你基本上只是复制网络服务器的功能,这就是将
URL解析为正确的页面。同时你创造了一个单点
的失败。
Err, have you developed in a team before? Keeping the filename in the URL,
as well as using unique names for files, make it easier for others to
understand your code. If there''s a problem in a page, all they have to do is
take quick glance at the URL to find the right file to examine.
Filtering all page requests through a single script is stupid. You are
basically just replicating what the web server does, which is resolving a
URL to the correct page. At the same time you create a single point of
failure.
这篇关于网址方案和优雅的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!