php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19186 Redirect to php.net/bad_function acts weird.
Submitted: 2002-08-30 00:00 UTC Modified: 2002-09-05 14:55 UTC
From: webkid at webkid dot com Assigned:
Status: Not a bug Package: Website problem
PHP Version: 4.2.2 OS: N/A
Private report: No CVE-ID: None
 [2002-08-30 00:00 UTC] webkid at webkid dot com
I have a script on my site that offers me a quick one-line command interface. I've integrated the ability to type in something to the effect of "php:function" to be redirected to http://www.php.net/function via a Location header.
If I type something (say, "php:font") and the search engine rather than a real function appears, all the links are relative to my domain. Example:

type "php:font"
head "Location: http://www.php.net/font"
top result links to "http://www.mydomain.com/style.css"

Important to note: If I type something to the effect of "php:date" (a real function) there is no problem.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-03 23:55 UTC] kalowsky@php.net
What would you rather have show up?  If you goto a bogus function, we provide you with a search results with that name.  If you goto a valid function name you will receive the manual on that page. 
 [2002-09-04 18:29 UTC] webkid at webkid dot com
No, you're missing my point. I'm very happy that the search engine comes up.

But the problem is that if I redirect to the site, ALL of the URLs on the page are WRONG! However, this only applies to a search. Rather than leading to http://www.php.net/manual/en/function.date.php (if that was one of the intended results) it leads to http://www.my_site_not_phpnet.com/manual/en/function.date.php

This is NOT the case when you redirect to the correct location.

Please note, again, that EVERY LINK leads to an *offsite* address. Not to php.net. I'm willing to bet this has something to do with the mirrors.
 [2002-09-05 03:59 UTC] imajes@php.net
well duh.

we use relative links not absolute links, so we save the x bytes of bandwidth every time not needing to transfer them.

get over it.
 [2002-09-05 06:17 UTC] goba@php.net
1. We user relative links, not absolute.
2. A <base href=""> in the search result htdig template would actually solve the problem, but I don't know where is that template located...
 [2002-09-05 14:55 UTC] kalowsky@php.net
Marking as bogus, I don't see this as a bug.  
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 14:01:29 2024 UTC