# Link\_to problem

**URL:** <https://www.ruby-forum.com/t/link-to-problem/170478>\
**Category:** Rails\
**Created:** [June 18, 2009, 1:00am UTC](https://www.ruby-forum.com/t/link-to-problem/170478 "2009-06-18T01:00:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![serb18](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/5daacb/32.png) [@serb18](https://www.ruby-forum.com/u/serb18)\
**Post date:** [June 18, 2009, 1:00am UTC](https://www.ruby-forum.com/t/link-to-problem/170478/1 "2009-06-18T01:00:11Z")

</div>

Hi,

having a problem with link\_to. My rail app is running in a sub directory  
and when i use link\_to for a file it does work, because link\_to does not  
place the subdirectory path in the url, but if i go to another page  
first, then go back to the same page where the link\_to is displayed it  
will display it properly and it will work. Really strange, can not seem  
to figure it out

BTW one thing i do notice on my server is that when my app goes displays  
the front page its in this format

[http://www.domain.com/appname](http://www.domain.com/appname)

instead of

[http://www.domain.com/appname/](http://www.domain.com/appname/)

If i put the / at the end manually after the front page is displayed,  
everything works fine, but i cant seem to figure out how to make it do  
that automatically?
