# Local file href or redirect

**URL:** <https://www.ruby-forum.com/t/local-file-href-or-redirect/169466>\
**Category:** Rails\
**Created:** [June 4, 2009, 1:41am UTC](https://www.ruby-forum.com/t/local-file-href-or-redirect/169466 "2009-06-04T01:41:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mk27](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5e9695/32.png) [@mk27](https://www.ruby-forum.com/u/mk27)\
**Post date:** [June 4, 2009, 1:41am UTC](https://www.ruby-forum.com/t/local-file-href-or-redirect/169466/1 "2009-06-04T01:41:09Z")

</div>

If I include a link like this in a view:

[GO!](http://www.ruby-forum.com)

The link works normally. But this:

GO!

is somehow blocked, and there is NO ERROR OR OTHER FORM OF EXPLANATION  
OR NOTIFICATION by webrick, rails, et. al. That is very un-user,  
un-programmer, un-friendly and I should sue ;]

How can I access a local file url???

---

<div class="post-metadata">

**Author:** ![mk27](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5e9695/32.png) [@mk27](https://www.ruby-forum.com/u/mk27)\
**Post date:** [June 4, 2009, 2:02am UTC](https://www.ruby-forum.com/t/local-file-href-or-redirect/169466/2 "2009-06-04T02:02:13Z")

</div>

I’m _pretty sure_ this is just a function of your browser’s security  
model not allowing access to filesystem URIs from an http:// page.  
Either way though, its not anything Rails has to do with.

---

<div class="post-metadata">

**Author:** ![mk27](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5e9695/32.png) [@mk27](https://www.ruby-forum.com/u/mk27)\
**Post date:** [June 4, 2009, 2:16am UTC](https://www.ruby-forum.com/t/local-file-href-or-redirect/169466/3 "2009-06-04T02:16:03Z")

</div>

pharrington wrote:

> I’m _pretty sure_ this is just a function of your browser’s security  
> model not allowing access to filesystem URIs from an http:// page.  
> Either way though, its not anything Rails has to do with.

Yep! I would never have guessed that. There is no way to disable this  
AFAICT either.

But I started apache (default port 80) and then used

[http://localhost/filesystem/somepath/etc](http://localhost/filesystem/somepath/etc)

and that works.

Much thanks
