thank you for all of your help. <br> Yes, I just want to link to a file on local machine. And yes, I added the file:// to the path, but it links to nowhere. When cursor over, it shows file:///var..... just like any other links on a html page outside Cat, but it links to nothing. Just wonder if you ever really put a link like that on your app.<br> I thought this is a simple matter, if a simple link could not do that, I think I have to apply the method that Peter has shown.<br> Thanks again<br><br><b><i>Peter Karman &lt;peter@peknet.com&gt;</i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> <br><br>Will Smith wrote on 5/24/07 10:43 AM:<br>&gt; the error is : File Not Found. Yes, I have apache, and also tried on dev<br>&gt; machine at localhost. Problem is when adding the file path to template, like:<br>&gt; <a href="%5B%%20myvar%20%%5D">listen</a>, and myvar =<br>&gt;
 '/var/www/html/myfolder/myfile.wav'; when move the cursor over  "listen" the<br>&gt; link is : http://localhost:3000/var/www/html/myfolder/myfile.wav  or<br>&gt; http://www.mydomain.com/var/www/html/myfolder/myfile.wav<br>&gt; <br>&gt; Obviously, this is the wrong path to the file. How can I drop the http://...<br>&gt; before the real path? Thank you<br><br>Your browser is assuming the http:// scheme since href value is relative.<br><br>If you want to serve via local fs, then you probably want file:// instead.<br><br>if you want to serve the .wav via http, you need the http:// scheme on there,<br>and you'll want to come up with a structure for serving static content that <br>doesn't use your Cat app directly. The way I do it is to have all my static <br>content served under a separate apache vhost, and then in my Cat code, set that <br>static url base in my config. So my .tt files look like:<br><br>  <a
 href="%5B%%20page.static%20%%5D/thing/I/want/to/serve">thing</a><br><br>The Static::Simple plugin lets you serve static content from Cat itself, but <br>that's intended for devel only since tying up Cat time with static content is <br>considered Not a Best Practice. So I just avoid it altogether and run a separate <br>apache process on my dev box that serves my static content for me. That way <br>moving from dev to production is as simple as changing the config definition for <br>[% page.static %].<br><br><br>-- <br>Peter Karman  .  http://peknet.com/  .  peter@peknet.com<br><br>_______________________________________________<br>List: Catalyst@lists.rawmode.org<br>Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst<br>Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/<br>Dev site: http://dev.catalyst.perl.org/<br></blockquote><br><p>&#32;
      <hr size=1><a href="http://us.rd.yahoo.com/evt=48226/*http://new.toolbar.yahoo.com/toolbar/features/norton/index.php">Get the free Yahoo! toolbar</a> and rest assured with the added security of spyware protection.