URL issues

hello…

sorry having some trouble posting, here is my question:

Hi,

not sure why my text is being hidden.....here is my question (for the
last time):

Hi,
   I watched the rails screencast on creating a blog in 15 minutes.
I followed along got it working on my home PC and I then uploaded it
to my web host. So I have,

/home/<username>/blog

  I had to change some config in the blog app (i.e. production mode,
db settings).

I then created a directory....

cd ~/public_html/bor

And a symlink to point to my blog app....

ln -s ~/blog/public ~/public_html/bor

I deleted the blog/public/index.html and I modified blog/config/
routes.rb to contain the following line:

map.connect '', :controller => 'blog', :action =>'index'

I did that so when someone goes to mysite.com/bor/ they would get
directed to what is the index action in my blog_controller.

Ok, so things are working and I can see my blog posts when I go to,
mysite.com/bor/ Now if I click on post I get redirected to
mysite.com/bor/blog/show/1 .....and from that page if I click "back"
I end up at mysite.com/bor/blog/list ....basically all the links look
like mysite.com/bor/blog/<blah blah blah> instead of what I hoped to
see, mysite.com/bor/<blah blah blah>.

Any ideas?

If it helps, my blog_controller.rb has the following method for the
"index" ...

def index
list
render :action => 'list'
end

Thanks!

cdvr wrote:

not sure why my text is being hidden.....here is my question (for the
last time):

Hi,
   I watched the rails screencast on creating a blog in 15 minutes.
I followed along got it working on my home PC and I then uploaded it
to my web host. So I have,

/home/<username>/blog

  I had to change some config in the blog app (i.e. production mode,
db settings).

I then created a directory....

cd ~/public_html/bor

And a symlink to point to my blog app....

ln -s ~/blog/public ~/public_html/bor

I deleted the blog/public/index.html and I modified blog/config/
routes.rb to contain the following line:

map.connect '', :controller => 'blog', :action =>'index'

I did that so when someone goes to mysite.com/bor/ they would get
directed to what is the index action in my blog_controller.

Ok, so things are working and I can see my blog posts when I go to,
mysite.com/bor/ Now if I click on post I get redirected to
mysite.com/bor/blog/show/1 .....and from that page if I click "back"
I end up at mysite.com/bor/blog/list ....basically all the links look
like mysite.com/bor/blog/<blah blah blah> instead of what I hoped to
see, mysite.com/bor/<blah blah blah>.

Any ideas?

If it helps, my blog_controller.rb has the following method for the
"index" ...

def index
list
render :action => 'list'
end

Thanks!

I'm assuming you mean the "back" link on your page?
Also assuming it was generated by scaffold, since you're going to the list action.

Change the link_to action (in views/blog/show.rhtml) from 'list' to 'index'.
eg:
link_to :controller => 'blog', :action => 'index'

With the route defined, it should automagically map to /