I discovered this wonderful article at zend discussing how to pass get
parameters as mock directory names . . . ie
www.ica.bc.ca/kb.php3?artid=34&catid=23 would become
www.ica.bc.ca/kb.php3/artid/34/catid/23. Then you retrieve these values from
the $PATH_INFO variable.

I tried it out on my site by deleting the get parameters and typing the mock
directories in on the url. Very cool, my website is still being displayed
even with the fake directories. BUT, I noticed that the server was not
finding my css page or my images. And when I click on one of the links on
the webpage, they get added to the end of my list of fake directories, ie:
www.ica.bc.ca/kb.php3/artid/34/catid/23/kb.php3?catid=56&artid=23

I also noticed that the server was finding the PHP include files.

Does this mean that I need to use absolute links for anything that is being
located after PHP is done with the page? I guess the server is looking for
the css page and the images relative to the fake directory. 

Am I missing something here? Has anybody tried this out? Is there any way
around using absolute links? 

I briefly thought of using my config file to create a variable for the
absolute link, ie $abs_link="http://www.ica.bc.ca/"; and then adding the
relative link to it. But my content is all stored in a database with lots of
embedded html. I would then end up with embedded php in my database and
would need to use eval (or something??) to execute that php.  Very messy and
slow I presume. I guess I could always use a search and destroy program to
change the absolute links when necessary. 

Sorry I'm starting to babble here I'd better leave now! . . . Just one more
thing though, I really love the zend articles. They've really clarified a
lot of things, and introduced stuff I'd never thought of before. They have a
whole section of articles, tutorials, columns, etc here:
http://www.zend.com/zend/art/

Thanks, Rita.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to