Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 521369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:14:36+00:00 2026-05-13T08:14:36+00:00

Edit: Well maybe this can give a clue. When created a Rails app in

  • 0

Edit:

Well maybe this can give a clue. When created a Rails app in cPanel on my web host, in order to access the app you need to create a rewrite rule. Which I did, but didn’t know what it did. I tracked it down to it creating the following 2 files:

home/mydomain/public_html/.htaccess:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^mydomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.mydomain.com$
RewriteRule ^/?$ "http\:\/\/127\.0\.0\.1\:12030%{REQUEST_URI}" [P,QSA,L]

and

home/mydomain/.cpanel/ruby-on-rails-rewrites.db:

  appname: helloworld
  domain: mydomain.com
  port: 12030
  rewritebasepath: /home/mydomain/public_html
  url: 

It seems that the root URL gets sent to Rails, but any other URL does not and I get an Apache 404 (not a Rails 404). Is there something wrong in the .htaccess file?
Is the rewrite condition only for the domain root? If it is, how can I make it for any URL ?

Original post:

I’m trying to deploy a rails website that works fine locally but not on the web server.
The rails app starts fine and I can access the home page. But any other link results in a 404.

My home page is set from within routes.rb like so:

  map.root :controller => "home"

I am using RESTful routes and it works fine locally. In routes.rb all I have is a bunch of

map.resources :posts
map.resources :images

…

If I change the map.root to another controller (i.e map.root :controller => "posts", then that single page will display fine as well, and all other links will return 404s, including the one that previously worked when it was the one referenced in map.root.

This is my first rails deployment so it might be me doing something wrong. My web host tech support told me it’s a coding issue and that they can’t help me.

My website directory structure online is like so:

/home/mydomain/etc/rails_apps/mysitedir/  <- rails folders (app, config, db, ...)
/home/mydomain/public_html/  <- nothing here

Also, the files that are in my rails public folder, do they need to stay in that folder or should they be put in the public_html folder on the web? Because right now they’re not found either. If I put them in the public_html folder though, they are found from the home page (javascript and css and images).

In my error log in cPanel, it shows errors like:

[Mon Oct 05 08:19:41 2009] [error] [client XX.XX.XX.XX]
File does not exist: /home/mydomain/public_html/market,
referer: http://www.mydomain.com/

Where market is one of the links I’m trying to access from my home page, for example, and it’s one of my controllers.

In short, the only location I can access is the root.

What am I doing wrong that I am getting all these 404s?
I do not have shell access, all I have is cPanel. This is with Ruby 1.8.5 and Rails 2.3.4, the (shared) web server is Linux + Apache 2.2.11 (Unix).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:14:36+00:00Added an answer on May 13, 2026 at 8:14 am

    The problem is with my web host. Still hasn’t been resolved by them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Edit: This question was written in 2008, which was like 3 internet ages ago.
EDIT: This was formerly more explicitly titled: - Best solution to stop Kontiki's KHOST.EXE
EDIT: This question is more about language engineering than C++ itself. I used C++
Edit: This was accidentally posted twice. Original: VB.NET Importing Classes I've seen some code
Edit: I have solved this by myself. See my answer below I have set
For some reason...maybe looking at too many different examples...this is one of those things
Edit: From another question I provided an answer that has links to a lot
EDIT: Learned that Webmethods actually uses NLST, not LIST, if that matters Our business
EDIT What small things which are too easy to overlook do I need to
Edit : Solved, there was a trigger with a loop on the table (read

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.