By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,216 Members | 1,023 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,216 IT Pros & Developers. It's quick & easy.

URLing schemes and elegance

P: n/a
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
Jul 17 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
R. Rajesh Jeba Anbiah wrote:
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


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.
Jul 17 '05 #2

P: n/a
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, 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

Jul 17 '05 #3

P: n/a
"Brad Kent" <bk***********@yahoo.com> wrote in message
news:7a**************************@posting.google.c om...
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!


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.

Jul 17 '05 #4

P: n/a
"R. Rajesh Jeba Anbiah" <ng**********@rediffmail.com> wrote in message
news:ab**************************@posting.google.c om...
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


I found it utterly stupid. This kind architecture usually requires passing a
user-supplied variable to include()--one of the leading causes of server
compromise in PHP sites.

When I look at my server log, I see requests for URLs like
'/?page=http://www.blog.ru/~vlds83/blob.txt' all the time. These are
automated attacks against scripts coded by folks who reinvent the wheel for
no good reason.

Take a look at www.php.net. Simple, straight forward schemes are elegant
imho.
Jul 17 '05 #5

P: n/a
Justin Koivisto <sp**@koivi.com> wrote in message news:<xX******************@news7.onvoy.net>...
R. Rajesh Jeba Anbiah wrote:
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


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.


Thanks for your comments. You seem to suggest mod_rewrite instead of
that scheme? But, if I'm right, they also seem to use mod_rewrite as
in the case:

http:talks.php.net/index.php/Web+Services
to
http:talks.php.net/index.php?page=Web+Services

Am I wrong?

--
| Just another PHP saint |
Email: rrjanbiah-at-Y!com
Jul 17 '05 #6

P: n/a
bk***********@yahoo.com (Brad Kent) wrote in message news:<7a**************************@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!


Thanks for your comments. I see your points. URLs like
/information/information.html are becoming popular because of some SEO
papers.

--
| Just another PHP saint |
Email: rrjanbiah-at-Y!com
Jul 17 '05 #7

P: n/a
"Chung Leong" <ch***********@hotmail.com> wrote in message news:<Wu********************@comcast.com>...
"R. Rajesh Jeba Anbiah" <ng**********@rediffmail.com> wrote in message
news:ab**************************@posting.google.c om...
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


I found it utterly stupid. This kind architecture usually requires passing a
user-supplied variable to include()--one of the leading causes of server
compromise in PHP sites.

When I look at my server log, I see requests for URLs like
'/?page=http://www.blog.ru/~vlds83/blob.txt' all the time. These are
automated attacks against scripts coded by folks who reinvent the wheel for
no good reason.

Take a look at www.php.net. Simple, straight forward schemes are elegant
imho.


Thanks for your comments. I could see, you're against to
"centralized" (ie, single index.php style as of phpNuke) architecture.
I could see the URLing style like index.php/foo as in
http://talks.php.net/index.php/Web+Services becoming popular in php
websites. I first saw such style in phpPatterns of Harry Fuecks eg.
<http://www.phppatterns.com/index.php/article/archive/11/>. But
nowadays this style is becoming more popular in PHP.

Personally, I'm not much attracted by this style. But, just liked to
know how many liked that style.

--
| Just another PHP saint |
Email: rrjanbiah-at-Y!com
Jul 17 '05 #8

P: n/a
"R. Rajesh Jeba Anbiah" <ng**********@rediffmail.com> wrote in message
news:ab**************************@posting.google.c om...
Thanks for your comments. I could see, you're against to
"centralized" (ie, single index.php style as of phpNuke) architecture.
I could see the URLing style like index.php/foo as in
http://talks.php.net/index.php/Web+Services becoming popular in php
websites. I first saw such style in phpPatterns of Harry Fuecks eg.
<http://www.phppatterns.com/index.php/article/archive/11/>. But
nowadays this style is becoming more popular in PHP.

Personally, I'm not much attracted by this style. But, just liked to
know how many liked that style.


Because there are more and more page-designers (as opposed to programmers)
using PHP, bringing with them their graphics oriented mindset. What they're
trying to accomplish is put a frame (top nav, side nav, tool bar, etc)
around some content in the middle of the page. Visually, it seems to make
sense to have this arrangement:

index.php:

[top nav HTML]
[side nav HTML]
<? include($content_path); ?>
[footer HTML]

From a functional point of view though, it really doesn't, since the main
functionality of that page is the stuff in the middle, while the frame
itself is of secondary importance. This is a better design:

article.php:

<?

include("header.php");
[ code that pull up the content ]
include("footer.php");

?>

because more control is given to the script that actually produces the
useful stuff. It could, for example, decide to use a slightly different
header because the content is wide and the page would look better with a
slimmer left nav, or it could forgo including the header altogether because
it's going to do a redirect. In a single entry point it wouldn't be able to
do the same as it has no control over the file that includes it.

Jul 17 '05 #9

P: n/a
"Chung Leong" <ch***********@hotmail.com> wrote in message news:<2-********************@comcast.com>...
"Brad Kent" <bk***********@yahoo.com> wrote in message
news:7a**************************@posting.google.c om...
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!


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.

having unique filenames makes perfect sense.. but since they're
unique what's with all the separate dir names of the same name holding
a single html file?
/path/information.html
/path/calendar.html
/path/contact-us.html
works just as well.
part of the problem I see with sites using my peeve is that they tend
to bork up on their navigation as well.. forgetting to use a
relative or absolute path to get to the other pages.
here's a site I just visited this morning that illustrates many of
these peeves/issues... http://www.fullmoonrun.com/
* a directory for each page..
* including "index.php" in their urls.
* not knowing how to link to the other pages once they're in their
directory mess
Jul 17 '05 #10

P: n/a
On Tue, 22 Jun 2004 13:21:28 -0700, Brad Kent wrote:
and back to my peeve.. what's with urls like /information/information.html
/calendar/calendar.html
/contact-us/contact-us.html
etc..
morons!


Having worked for an online mall, we were told that such repetition is one
way to force a higher ranking in some search engines. Some designers at
that mall likewise have paragraphs full of key words, using CSS to hide
this nonsense from the end user.

La'ie Techie

Jul 17 '05 #11

P: n/a
R. Rajesh Jeba Anbiah wrote:
Justin Koivisto <sp**@koivi.com> wrote in message
news:<xX******************@news7.onvoy.net>...
R. Rajesh Jeba Anbiah wrote:
> 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


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.


Thanks for your comments. You seem to suggest mod_rewrite instead of
that scheme? But, if I'm right, they also seem to use mod_rewrite as
in the case:

http:talks.php.net/index.php/Web+Services
to
http:talks.php.net/index.php?page=Web+Services

Am I wrong?


Mod_rewrite usage doesn't even require the ".php" extension. All someone
browsing a site using mod_rewrite to rewrite the URLs would see is
www.site.com/content/whatever

The backend of the site could be php, perl, python, a CGI app, whatever, and the
URI's would stay the same even if someone switches the backend to an entirely
different programming language.
Jul 17 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.