> my main URL (for example) is www.mycompany.com
> I want the central page about our projects to be found under
> www.mycompany.com/projects
> and project LovePeaceAndBananas under
> www.mycompany.com/projects/LovePeaceAndBananas
> I already know that this can be achieved by using the $PATH_INFO as
> variables, to be used in de main file in the root of the site.
> So far I have my Apache webserver accept files with no extention
> (index, in
> stead of index.php) to be parsed as PHP. But if I look at the site of
> DevShed, I don't see them using a file at all! I can't get it to
> work on my
> local test system to make an URL like
> www.mycompany.com/projects/LovePeaceAndBananas without the existens of a
> file called 'projects'.
> Can anyone tell me their 'trick'? (unfortunately, they don't show
> their page
> source anymore like they used to do ...)


see this page for more details


You do actually need the file called projects. This is the file that does
all the work.

It didn't quite work exactly as that for me, so here's what I did just in
case you need it.

add the follwoing into  .htaccess under you site root

## set rewrite rule for author
RewriteRule ^/projects/(.*) /projects?rest_of_url=/$1

Then add this to your projects file

$_MY_PATH = explode("/",$PATH_INFO);

This will give you the array of elements that come after projects.
i.e /projects/LovePeaceAndBananas/one

$_MY_PATH[0] // this will be LovePeaceAndBananas
$_MY_PATH[1] // this is one




PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to