Page 1 of 1

site structure/URL

Posted: Wed Dec 03, 2003 5:32 pm
by ptysell
I am in the preliminary stages of development of revamping a web site that was done in PERL and converting it to PHP/MYSQL.

I want old bookmarks to work.

Here is my dilemma

Would it be better to develop the site around the concept of a URL request looking like
http://www.something.com/index.php?sect ... xx&....ect

It seams as if this avenue is the easiest to do because there is one file that is being requested and it generates code based on the variables passed to it through the link.

This is a method that I have implemented in the past without any problems.

OR

This is what I would like the URL request to look like
http://www.something.com/lala/subsection/

Now this method would allow for the old bookmarks to still be valid, but then there would need to be a directory structure and each folder would need a PHP file in it with includes and what not.

I would prefer this method.

So my question to you is which would be better in the long run?

Also in regards to method 2, how would one go about getting the requested variables out of the URL request so that I can manipulate the PHP content base on them?

I hope that this made some since...now it is time for sleep...

Thanks

Re: site structure/URL

Posted: Wed Dec 03, 2003 6:26 pm
by niceguyeddie
ptysell wrote:
So my question to you is which would be better in the long run?

Also in regards to method 2, how would one go about getting the requested variables out of the URL request so that I can manipulate the PHP content base on them?
The directory structure is much more perferable for SEO reasons than anything else. It also looks a little nicer.

Here's how we are doing it in Xaraya without modrewrite. It might give you a couple of ideas.

http://docs.xaraya.com/docs/rfcs/rfc0023.html

Posted: Wed Dec 03, 2003 7:27 pm
by ptysell
this is what i came up with

Code: Select all

$urlpath = $_SERVER['PHP_SELF'];
$dirpath = explode('/',$urlpath);
is this the best way?