PDA

View Full Version : Phpdig producing multiple results


mdavila
02-10-2005, 08:49 AM
Having a problem with phpdig producing multiple results of the same page. In the results the url to the page has a bunch of folders appended to the end such as: http://www.ascential.com/litlib/qa_davis.html/customers/
customers/customers/customers/customers/

As you can see the /customers/ gets appended to the url multiple times. Any insight to what may be causing th is?

Thanks,
-Marc

Charter
02-10-2005, 02:13 PM
The appending of /customers/ is probably coming from the menu. PhpDig doesn't know that when it sees <a href="/customers/" ...> you really mean it to be <a href="http://www.ascential.com/customers/" ...> so PhpDig treats it as a subdirectory of the current page, whatever that page may be. To tell PhpDig to treat relative links as if they were coming from a different place, and not the currect page, try sticking a base href tag in the head portion of the HTML. Note though that this will treat all relative links as if they were coming from whatever link is provided in the base href tag.

<base href="http://www.ascential.com/" />
<!-- or -->
<base href="http://www.ascential.com/dir1/" />
<!-- or -->
<base href="http://www.ascential.com/dir1/dir2/" />

mdavila
02-11-2005, 05:49 AM
Thanks. That seems to have resolved the problem. Much appreciated.