<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1012125" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1012125</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/how-parse-relative-links-absolute-links#comment-1069947</link>
    <description> &lt;p&gt;that won&#039;t work for stuff in subdirectories, like:&lt;br /&gt;
&lt;a href=&quot;http://blah.com/my_dir/&quot; class=&quot;bb-url&quot;&gt;http://blah.com/my_dir/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;not tested:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;$BaseURL = &amp;quot;http://&amp;quot;.&amp;quot;$ENV{HTTP_HOST}&amp;quot;.&amp;quot;$ENV{REQUEST_URI}&amp;quot;;&lt;br /&gt;$BaseURL =~ /(.*)\/(.*).(.*)/;&lt;br /&gt;$BaseURL = &amp;quot;http=\&amp;quot;$1/&amp;quot;;&lt;br /&gt;&lt;br /&gt;open(FILE, &amp;quot;your.html&amp;quot;);&lt;br /&gt;$ThePage = join(&amp;quot;|break|&amp;quot;, &amp;lt;FILE&amp;gt;);&lt;br /&gt;close(FILE);&lt;br /&gt;&lt;br /&gt;$ThePage =~ s/http=&amp;quot;/$BaseURL/g;&lt;br /&gt;$ThePage =~ s/\|break\|/\n/g;&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
 </description>
     <pubDate>Wed, 23 Aug 2000 06:50:31 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1069947 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/how-parse-relative-links-absolute-links#comment-1069936</link>
    <description> &lt;p&gt;Here is a some regular expressions that will do it. Just substitute $url with the url to be used and $file to the file to be searched. It&#039;s not tested so check for errors.&lt;/p&gt;
&lt;p&gt;#!/usr/bin/perl -w #change to yer perl root&lt;/p&gt;
&lt;p&gt;$url = &quot;href=\&quot;http://www.bleh.com/&quot;;&lt;br /&gt;
#you have to have href=&quot; in it to replace the match&lt;br /&gt;
$file = &quot;file.html&quot;;&lt;/p&gt;
&lt;p&gt;open (FILE, &amp;lt; &quot;$file&quot;);&lt;br /&gt;
@contents = ;&lt;br /&gt;
close (FILE);&lt;/p&gt;
&lt;p&gt;foreach $line(@contents) {&lt;br /&gt;
$line =~ s/href=&quot;/$url/;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;This will replace every occurance of - href=&quot; - so if you have some that you don&#039;t want to be changed...banners etc. You will need to change them back.&lt;/p&gt;
&lt;p&gt;VulKen&lt;br /&gt;
&lt;strong&gt;What the world needs, is more tutorials!&lt;/strong&gt;&lt;/p&gt;
 </description>
     <pubDate>Wed, 23 Aug 2000 03:14:30 +0000</pubDate>
 <dc:creator>Ken Elliott</dc:creator>
 <guid isPermaLink="false">comment 1069936 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
