Forum: Ruby on Rails RoR site structure on Apache

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.
Mark S. (Guest)
on 2006-02-25 04:17
This is a simple 'hello word' application.

code structure is here

http://www.smtservers.com/demo/

I can access it here

http://www.smtservers.com/demo/public/say/hello

But the url so long and other people can see my source code

I want to access the same code like this

http://www.smtservers.com/say/hello

I also the hosting company,he told me change .htaccess.

Please give me a idea how to change the setting in .htaccess

Thanks

MS
Colin (Guest)
on 2006-02-25 13:34
You should change your DocumentRoot. It now points to /../../demo you
want it to point to /../../demo/public

You should change the Directory directive(s) accordingly.
Mark S. (Guest)
on 2006-02-25 15:05
Colin wrote:
> You should change your DocumentRoot. It now points to /../../demo you
> want it to point to /../../demo/public
>
> You should change the Directory directive(s) accordingly.

I can not httpd.conf.The hosting company ask me to change
.htaccess.Please show me how to change .htaccess.Thanks
Craig W. (Guest)
on 2006-02-25 15:25
(Received via mailing list)
On Sat, 2006-02-25 at 14:05 +0100, mark sheran wrote:
> Colin wrote:
> > You should change your DocumentRoot. It now points to /../../demo you
> > want it to point to /../../demo/public
> >
> > You should change the Directory directive(s) accordingly.
>
> I can not httpd.conf.The hosting company ask me to change
> .htaccess.Please show me how to change .htaccess.Thanks
----
a virtual host provider is a terrible environment with which to learn
RonR and you are wasting your time.

learn/develop on your own system and use the included webrick server on
your machine as your web server. After you have an application ready to
use, you can then work with your virtual host provider to get it
transferred over and functional...which is still likely to be no easy
task if the virtual host provider is not familiar with providing RonR
services.

To answer your question (not that it is going to help you), an .htaccess
file is created in the public directory automatically when you issue
command...'rails WHATEVER' - thus - you should already have this file.

Craig
Mark S. (Guest)
on 2006-02-25 19:39
I see the .htaccess.Please let me know how to change it make the link
work
http://www.smtservers.com/say/hello

and like
http://www.smtservers.com/demo/public/say/hello

I do not like people see my site structure.

Thanks
Ben M. (Guest)
on 2006-02-25 19:54
(Received via mailing list)
Craig W. wrote:
> a virtual host provider is a terrible environment with which to learn
> RonR and you are wasting your time.
>
> learn/develop on your own system and use the included webrick server on
> your machine as your web server. After you have an application ready to
> use, you can then work with your virtual host provider to get it
> transferred over and functional...which is still likely to be no easy
> task if the virtual host provider is not familiar with providing RonR
> services.

Yes, Mark, please... You keep asking how to fix your "hello world" app
on your server and
several of us, myself included, have told you that this is a bad idea.
Do you have a
computer at home?
Mark S. (Guest)
on 2006-02-25 21:35
Yes I learn that in my windows system

but I have to know how to make RoR work in hosting machine

Thank you for help

Mark
Ryan P. (Guest)
on 2006-02-27 07:56
(Received via mailing list)
Alright, I can't vouch for how well this will or won't work, but you
could
try URL Rewriting:

http://www.yourhtmlsource.com/sitemanagement/urlre...

Read that tutorial and try it out. However, I can't tell you how this
will
diner your performance.

Hope that helps,
Ryan
This topic is locked and can not be replied to.