# Moving an existing Rails app, css links are wrong

**URL:** <https://www.ruby-forum.com/t/moving-an-existing-rails-app-css-links-are-wrong/81817>\
**Category:** Rails\
**Created:** [January 15, 2007, 9:37am UTC](https://www.ruby-forum.com/t/moving-an-existing-rails-app-css-links-are-wrong/81817 "2007-01-15T09:37:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MJMJMJ](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e95f7d/32.png) [@MJMJMJ](https://www.ruby-forum.com/u/MJMJMJ)\
**Post date:** [January 15, 2007, 9:37am UTC](https://www.ruby-forum.com/t/moving-an-existing-rails-app-css-links-are-wrong/81817/1 "2007-01-15T09:37:56Z")

</div>

Hi,

I just moved my existing Rails app from /oldblog to /newblog.  
It works great only the css links and the controller links still  
get written as:  
[http://mydomain.com/oldblog/stylesheets/main.css](http://mydomain.com/oldblog/stylesheets/main.css) instead of  
[http://mydomain.com/newblog/stylesheets/main.css](http://mydomain.com/newblog/stylesheets/main.css).  
How can I change this?

Thanks,  
MJ

---

<div class="post-metadata">

**Author:** ![MJMJMJ](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e95f7d/32.png) [@MJMJMJ](https://www.ruby-forum.com/u/MJMJMJ)\
**Post date:** [January 15, 2007, 1:58pm UTC](https://www.ruby-forum.com/t/moving-an-existing-rails-app-css-links-are-wrong/81817/2 "2007-01-15T13:58:15Z")

</div>

> css files’ path are defined in the view files, normally inside layout  
> files.  
> app\view\layouts\xxxx.rhmtl

That’s right, but there is simply says \<% stylesheet\_link\_tag “main” %\>

---

<div class="post-metadata">

**Author:** ![MJMJMJ](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e95f7d/32.png) [@MJMJMJ](https://www.ruby-forum.com/u/MJMJMJ)\
**Post date:** [January 15, 2007, 11:37am UTC](https://www.ruby-forum.com/t/moving-an-existing-rails-app-css-links-are-wrong/81817/3 "2007-01-15T11:37:59Z")

</div>

MJ wrote:

> Hi,
> 
> I just moved my existing Rails app from /oldblog to /newblog.  
> It works great only the css links and the controller links still  
> get written as:  
> [http://mydomain.com/oldblog/stylesheets/main.css](http://mydomain.com/oldblog/stylesheets/main.css) instead of  
> [http://mydomain.com/newblog/stylesheets/main.css](http://mydomain.com/newblog/stylesheets/main.css).  
> How can I change this?
> 
> Thanks,  
> MJ

css files’ path are defined in the view files, normally inside layout  
files.  
app\view\layouts\xxxx.rhmtl
