Question

I have a joomla site in my domain root, i.e www.myjoomlasite.com and I have a rails application in www.myrailssite.com/railsapp

I want to deploy the rails application in a sub-directory of http://www.myjoomlasite.com, expecting that rails application will be available in http://www.myjoomlasite.com/railsapp.

After doing all necessary steps when i click, www.myjoomlasite.com/railsapp in browser, it redirect me correctly to http://www.myjoomlasite.com/railsapp/admins/sign_in

Then in spite of displaying the sign_in page, it displayed joomla's error page "404 page not found"

My questions are:

  1. If anything wrong with the rails application it should display rails error page, but why joomla's error page?
  2. In rails application production log why it showing Completed 401 Unauthorized in 1ms ?
  3. How can i deploy rails application in a sub-directory of my joomla site?

Additional information:

rails application production log

Started GET "/railsapp" for 24.5.7.81 at 2012-09-14 08:41:36 -0700
Processing by HomeController#index as HTML
Completed 401 Unauthorized in 1ms

UPDATE

I have found the possible reason behind '404'. I have .htaccess file in document root. This .htaccess file stoping rails application to render.

Is it possible make some changes in .htaccess file show that, rails app can render properly?

Was it helpful?

Solution

There is a .htaccess file in document root. This default .htaccess file comes with joomla source code ( as htaccess.txt, letter is was renamed to .htaccess). There is one RewriteRule based upon some RewriteCond . All the rewrite condition, that are comes with default htaccess file, stopping my "/railsapp" url to render. To allow to pass my "/railsapp" i add following RewriteCond in .htaccess

RewriteCond %{REQUEST_URI} !^/railsapp

If any url start with 'railsapp' prefix, then those url will not rewrited by rewrite rule and visit that url directly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top