Re: [PHP] Re: help on using 'request_uri' to make a front-end site

2008-03-18 Thread Richard Heyes
A link causes 'index.php/use1' to be appended to the full url [http://localhost/~donn/template-dev/routertest/] and at first, it's fine but after a few clicks, it keeps appending. Amazingly things still work, but the URL is out of control! Links that don't start with a / are taken to be relat

Re: [PHP] Re: help on using 'request_uri' to make a front-end site

2008-03-18 Thread Donn
On Tuesday, 18 March 2008 12:02:14 Richard Heyes wrote: > You can use $_SERVER['PHP_SELF'] which will give you the path to the > script or $_SERVER['REQUEST_URI'] (you will probably have to remove the > query string with this), along with either dirname(). The problem is that the URL does not stay

Re: [PHP] Re: help on using 'request_uri' to make a front-end site

2008-03-18 Thread Richard Heyes
The thing that would help here is if I could get a reliable way to extract the working 'path' (from an http:// pov) from the $_SERVER array somehow. Each of them gives a result tantalizingly close to the base, but they get it wrong in various ways. You can use $_SERVER['PHP_SELF'] which will giv