Forum: Ruby on Rails Local file href or redirect

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
68814ed988eee4f21b2cd07353e5e445?d=identicon&s=25 Mk 27 (mk27)
on 2009-06-04 01:41
If I include a link like this in a view:

<a href="http://www.ruby-forum.com">GO!</a>

The link works normally.  But this:

<a href="file://var/www/html/index.html">GO!</a>

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???
885ac43bca92fc2b1034356f3283e788?d=identicon&s=25 pharrington (Guest)
on 2009-06-04 02:02
(Received via mailing list)
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.
68814ed988eee4f21b2cd07353e5e445?d=identicon&s=25 Mk 27 (mk27)
on 2009-06-04 02:16
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

and that works.

Much thanks
This topic is locked and can not be replied to.