Simpler urls
- From: Paul Furman <paul-@xxxxxxxxxxxxx>
- Date: Tue, 10 Jul 2007 22:56:39 GMT
I want to have urls that work like the php.net pages where there's just a word after a slash, maybe a few folders deep. Right now I've got urls & code like this:
http://www.edgehill.net/1/?SC=go.php&DIR=California
But I'd prefer:
http://www.edgehill.net/California
<?php
function chk_screen(){
$default_screen = 'home.php'; # the default screen
if(isset($_REQUEST['SC'])) {
if(is_file(SCREEN_DIR . "/" . basename($_REQUEST['SC']))) {
$SCREEN = basename($_REQUEST['SC']);
} else {
$SCREEN = $default_screen;
}
if($SCREEN == 'main.php') {
$SCREEN = 'home.php';
$_REQUEST['SC'] = $SCREEN;
}
} else {
$SCREEN = $default_screen;
}
return $SCREEN;
}?>
The images are stored in a folder heirarchy, there is no database but I'm guessing I'll have to add one with an index & serial numbers for each image. The folder structure is part of the properties of each image though:
&DIR=California/Bay-Area/San-Francisco/neighborhoods/2007-06-19-stanyan
then the url gets this too:
&PG=1&PIC=1
I'd like to see at most:
http://www.edgehill.net/California/Bay-Area/San-Francisco/neighborhoods/2007-06-19-stanyan/005
Ideally it could trim off most of that in hidden POST data?
(I forget how)
I could just try snipping off the "1/?SC=go.php&DIR=" and "&PG=1&PIC=1"
http://www.edgehill.net/stanyan/001
or add a database & use something like this:
http://www.edgehill.net/000001
Part of the effort is to create a fresh set of folders & the old archive folders remain as the 'database' and sorted by location & date. One such new folder could be a blog with my (usually weekly) photo updates, then categories for nature, plants, landscapes, people.
I've built the collection with text files for captions & the folders with date & location so I guess all that needs to go in a database & get indexed.
--
Paul Furman Photography
http://www.edgehill.net/1
Bay Natives Nursery
http://www.baynatives.com
.
- Follow-Ups:
- Re: Simpler urls
- From: NC
- Re: Simpler urls
- Prev by Date: magic_quotes_gpc woes
- Next by Date: Re: Simpler urls
- Previous by thread: magic_quotes_gpc woes
- Next by thread: Re: Simpler urls
- Index(es):
Relevant Pages
|