that's a pretty good technique! haven't tried it either.
Jul 1st, 2007I think the problem is, if I call
http://url.com/portfolio/E-Commerce
it opens the folder portfolio/E-Commerce an not http://url.com/index.php where the script is...
ah okay, I read the link and it says:
"Its possible to hide the extension .php if you want and if your server configuration support it by adding in .htaccess : ForceType application/x-httpd-php Then create a copy of index.php and name it "index" only !. Now you can call directly http://localhost/index/news/computers/ ..."
That will work.
maybe it's only me, but it doesn't matter if it's called from that "virtual" directory since if you code your links well, it should always call anything from the root or http link. like http://www.domain/link/to/your/file
works from any directory...
If you suck at htaccess editing/mod_rewrite, or don't have permission to, this is a great alternative
Jul 1st, 2007this is incredibly simple -- and i feel so retarded for not realizing it before.
index.php?page=portfolio§ion=E-Commerce
that be an ugly URL.
now, my $page is an include, and my $section is part of a query string for the database ( to only pull my E-commerce projects )
in the head / top of your page ( header file or index template - however you do it )
$PATH_INFO = $GLOBALS['HTTP_SERVER_VARS']['REQUEST_URI'];
$path = explode('/',$PATH_INFO);
$page = $path[1];
$cat = $path[2];
(.. i stopped here because i dont need to go deeper )
$subcat = $path[3];
$post = $path[4];
etc.. you can add as many as you need, it will assign a variable to each /*value*/ there. just got to keep your variables in your URL in a specific order.
here's some fuzzy documentation ( it didnt make a lick of sense to me because $GLOBALS['HTTP..VARS']['PATH_INFO'] doesnt exist for me )
http://seo.phpmagazine.net/2005/08/search_engine_optimization_les_2.html