<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Server side redirects and wrong links in the resulting page</title>
        <description> I have a header(Location: ) statement in my php file. The spider picks up the redirection fine, fetches and indexes the page BUT all the relative links in the page which the spider has been are not found.

Example the page [blah.com] redirects to [blah.com] - the spider gets the page [blah.com] but it still tries to find relative the links inside this page relative to [blah.com] instead of [blah.com]

P.S. Phorum is converting the http urls to links :(</description>
        <link>http://www.sphider.eu/forum/read.php?2,33,33#msg-33</link>
        <lastBuildDate>Sat, 25 May 2013 18:34:38 +0300</lastBuildDate>
        <generator>Phorum 5.2.10</generator>
        <item>
            <guid>http://www.sphider.eu/forum/read.php?2,33,34#msg-34</guid>
            <title>Re: Server side redirects and wrong links in the resulting page</title>
            <link>http://www.sphider.eu/forum/read.php?2,33,34#msg-34</link>
            <description><![CDATA[ OK found a solution....<br />
<br />
Line 129 in file spiderfuncs.php currently reads <br />
if (ereg(&quot;Location: *([^\n\r ]+)&quot;, $answer, $regs) &amp;&amp; $httpcode == 3 &amp;&amp; $full_httpcode != 302)<br />
<br />
it should be <br />
<br />
if (ereg(&quot;Location: *([^\n\r ]+)&quot;, $answer, $regs) &amp;&amp; $httpcode == 3 &amp;&amp; $full_httpcode == 302)<br />
<br />
Notice the last == instead of !=<br />
<br />
HTH<br />
<br />
Tarique]]></description>
            <dc:creator>tariquesani</dc:creator>
            <category>Sphider Support</category>
            <pubDate>Tue, 20 Mar 2007 13:26:38 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.sphider.eu/forum/read.php?2,33,33#msg-33</guid>
            <title>Server side redirects and wrong links in the resulting page</title>
            <link>http://www.sphider.eu/forum/read.php?2,33,33#msg-33</link>
            <description><![CDATA[ I have a header(Location: ) statement in my php file. The spider picks up the redirection fine, fetches and indexes the page BUT all the relative links in the page which the spider has been are not found.<br />
<br />
Example the page [<a href="http://blah.com/foo/index.php" rel="nofollow" >blah.com</a>] redirects to [<a href="http://blah.com/foo/bar/index.php" rel="nofollow" >blah.com</a>] - the spider gets the page [<a href="http://blah.com/foo/bar/index.php" rel="nofollow" >blah.com</a>] but it still tries to find relative the links inside this page relative to [<a href="http://blah.com/foo/" rel="nofollow" >blah.com</a>] instead of [<a href="http://blah.com/foo/bar/" rel="nofollow" >blah.com</a>]<br />
<br />
P.S. Phorum is converting the http urls to links :(]]></description>
            <dc:creator>tariquesani</dc:creator>
            <category>Sphider Support</category>
            <pubDate>Mon, 19 Mar 2007 15:31:18 +0200</pubDate>
        </item>
    </channel>
</rss>
