Reply to Simpler urls

Your name:

Reply:


Posted by Paul Furman on 07/10/07 22:56

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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация