Apache Server configuration support - .htaccess problem with Radiant application

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > May 2007 > .htaccess problem with Radiant application





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author .htaccess problem with Radiant application
Charles

2007-05-08, 1:20 pm

Hello, I tried to install Radiant, it seems to be almost installed,
but the links are broken (and the style sheet is unaccessible). Here's
the content of my /home/charles/www/radiant/public/.htaccess:


# General Apache options
AddHandler fastcgi-script .fcgi
#AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI

# If you don't want Rails to look in certain directories,
# use the following rewrite rules so that Apache won't rewrite certain
requests
#
# Example:
# RewriteCond %{REQUEST_URI} ^/notrails.*
# RewriteRule .* - [L]

# Redirect all requests not available on the filesystem to Rails
# By default the cgi dispatcher is used which is very slow
#
# For better performance replace the dispatcher with the fastcgi one
#
# Example:
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
RewriteEngine On

# If your Rails application is accessed via an Alias directive,
# then you MUST also set the RewriteBase in this htaccess file.
#
# Example:
# Alias /myrailsapp /path/to/myrailsapp/public
# RewriteBase /myrailsapp

RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

# In case Rails experiences terminal errors
# Instead of displaying this message you can supply a file here which
will be rendered instead
#
# Example:
# ErrorDocument 500 /500.html

ErrorDocument 500 "<h2>Application error</h2>Rails application failed
to start properly"





And here's the public page: http://www.auriance.com/radiant/public/
I don't know exactly what to comment/uncomment in .htaccess. Could you
help me please?
Thanks,


--
Charles A. Landemaine.

shimmyshack

2007-05-08, 1:20 pm

On May 8, 1:22 pm, Charles <landema...@gmail.com> wrote:
> Hello, I tried to install Radiant, it seems to be almost installed,
> but the links are broken (and the style sheet is unaccessible). Here's
> the content of my /home/charles/www/radiant/public/.htaccess:
>
> # General Apache options
> AddHandler fastcgi-script .fcgi
> #AddHandler cgi-script .cgi
> Options +FollowSymLinks +ExecCGI
>
> # If you don't want Rails to look in certain directories,
> # use the following rewrite rules so that Apache won't rewrite certain
> requests
> #
> # Example:
> # RewriteCond %{REQUEST_URI} ^/notrails.*
> # RewriteRule .* - [L]
>
> # Redirect all requests not available on the filesystem to Rails
> # By default the cgi dispatcher is used which is very slow
> #
> # For better performance replace the dispatcher with the fastcgi one
> #
> # Example:
> RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
> RewriteEngine On
>
> # If your Rails application is accessed via an Alias directive,
> # then you MUST also set the RewriteBase in this htaccess file.
> #
> # Example:
> # Alias /myrailsapp /path/to/myrailsapp/public
> # RewriteBase /myrailsapp
>
> RewriteRule ^$ index.html [QSA]
> RewriteRule ^([^.]+)$ $1.html [QSA]
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
>
> # In case Rails experiences terminal errors
> # Instead of displaying this message you can supply a file here which
> will be rendered instead
> #
> # Example:
> # ErrorDocument 500 /500.html
>
> ErrorDocument 500 "<h2>Application error</h2>Rails application failed
> to start properly"
>
> And here's the public page:http://www.auriance.com/radiant/public/
> I don't know exactly what to comment/uncomment in .htaccess. Could you
> help me please?
> Thanks,
>
> --
> Charles A. Landemaine.


you need to tell the application where its root is.
at the moment you are serving the application from
/radiant/public
but it thinks its root is
/
so the stylesheets and links are being created relative to /
/styles.css etc...
If there is nowhere in the setup you can set the application root, try
creating an alias.
Alias /radiant /radiant/public
and/or changing the ReWriteBase to
ReWriteBase /radiant/public

I havent used radiant, and the radiant forums would be the place to
answer this, but this is a path config issue.

Charles

2007-05-08, 1:20 pm

On May 8, 9:30 am, shimmyshack <matt.fa...@gmail.com> wrote:
> On May 8, 1:22 pm, Charles <landema...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
>
>
>
>
> you need to tell the application where its root is.
> at the moment you are serving the application from
> /radiant/public
> but it thinks its root is
> /
> so the stylesheets and links are being created relative to /
> /styles.css etc...
> If there is nowhere in the setup you can set the application root, try
> creating an alias.
> Alias /radiant /radiant/public
> and/or changing the ReWriteBase to
> ReWriteBase /radiant/public
>
> I havent used radiant, and the radiant forums would be the place to
> answer this, but this is a path config issue.





Thank you. I added these two lines but now I get an "Internal Server
Error" message
(I already asked for help on the Radiant forum yesterday)
Thanks again.

shimmyshack

2007-05-08, 1:20 pm

On May 8, 5:27 pm, Charles <landema...@gmail.com> wrote:
> On May 8, 9:30 am, shimmyshack <matt.fa...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Thank you. I added these two lines but now I get an "Internal Server
> Error" message
> (I already asked for help on the Radiant forum yesterday)
> Thanks again.


this is certainly a problem with the radient application, your
questions should go there.
http://www.ruby-forum.com/topic/82446
John Long - the creator of radiant says "I wouldn't recommend running
Radiant in a sub-directory. It isn't
designed with this in mind." That to me says - "I havent coded for
that so dont do it"

dedicate a virtualhost to this if you can, and run it in root, or else
go back to radiant and ask for the "app root" to be taken into account
- TBH I am amazed it isnt!

shimmyshack

2007-05-08, 1:20 pm

On May 8, 5:43 pm, shimmyshack <matt.fa...@gmail.com> wrote:
> On May 8, 5:27 pm, Charles <landema...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> this is certainly a problem with the radient application, your
> questions should go there.http://www.ruby-forum.com/topic/82446
> John Long - the creator of radiant says "I wouldn't recommend running
> Radiant in a sub-directory. It isn't
> designed with this in mind." That to me says - "I havent coded for
> that so dont do it"
>
> dedicate a virtualhost to this if you can, and run it in root, or else
> go back to radiant and ask for the "app root" to be taken into account
> - TBH I am amazed it isnt!


I dont know anything about radiant, else I would just give you the
rewrites needed, this can be solved with rewrites of course, to
rewrite ALL the links that try to go to root to be internally
redirected to the place you actually have them. Perhaps someone else
who uses radiant on apache will take pity on you!

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com