# Ruby URL format

**URL:** <https://www.ruby-forum.com/t/ruby-url-format/146660>\
**Category:** Rails\
**Created:** [August 23, 2008, 8:55pm UTC](https://www.ruby-forum.com/t/ruby-url-format/146660 "2008-08-23T20:55:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomzoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/a88e4f/32.png) [@tomzoo](https://www.ruby-forum.com/u/tomzoo)\
**Post date:** [August 23, 2008, 8:55pm UTC](https://www.ruby-forum.com/t/ruby-url-format/146660/1 "2008-08-23T20:55:17Z")

</div>

I’m working on a straight forward rails app. One thing that has me  
puzzled is the generated hyperlinks in rails,

\<%= link\_to ‘Home’, :controller =\> ‘my\_controller’, :action =\> ‘index’  
%\>

generates a hyperlink like:

[Home](https://www.ruby-forum.com/my_app/public/my_app)

when I’d expect:

[Home](https://www.ruby-forum.com/my_app)

I’m a novice, is there something in the .htaccess I need to change or in  
the routes.rb file, so I get a hyperlink in the format of the latter.

Thanks  
T

---

<div class="post-metadata">

**Author:** ![tomzoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/a88e4f/32.png) [@tomzoo](https://www.ruby-forum.com/u/tomzoo)\
**Post date:** [August 24, 2008, 4:16pm UTC](https://www.ruby-forum.com/t/ruby-url-format/146660/2 "2008-08-24T16:16:10Z")

</div>

Is that happening when deploying?

On Aug 23, 9:55 pm, Tom E. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![tomzoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/a88e4f/32.png) [@tomzoo](https://www.ruby-forum.com/u/tomzoo)\
**Post date:** [August 24, 2008, 7:56pm UTC](https://www.ruby-forum.com/t/ruby-url-format/146660/3 "2008-08-24T19:56:44Z")

</div>

Andrius C. wrote:

> Is that happening when deploying?
> 
> On Aug 23, 9:55ï¿½pm, Tom E. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

Yes, on my local machine this does not happen, but when deployed to my  
host the problem appears.
