.htaccess problem with Radiant application

.htaccess problem with Radiant application

am 08.05.2007 14:22:02 von landemaine

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 "

Application error

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.

Re: .htaccess problem with Radiant application

am 08.05.2007 14:30:50 von shimmyshack

On May 8, 1:22 pm, Charles 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 "

Application error

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.

Re: .htaccess problem with Radiant application

am 08.05.2007 18:27:02 von landemaine

On May 8, 9:30 am, shimmyshack wrote:
> On May 8, 1:22 pm, Charles 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 "

Application error

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.




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.

Re: .htaccess problem with Radiant application

am 08.05.2007 18:43:25 von shimmyshack

On May 8, 5:27 pm, Charles wrote:
> On May 8, 9:30 am, shimmyshack wrote:
>
>
>
> > On May 8, 1:22 pm, Charles 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 "

Application error

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.
>
> 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!

Re: .htaccess problem with Radiant application

am 08.05.2007 18:45:34 von shimmyshack

On May 8, 5:43 pm, shimmyshack wrote:
> On May 8, 5:27 pm, Charles wrote:
>
>
>
> > On May 8, 9:30 am, shimmyshack wrote:
>
> > > On May 8, 1:22 pm, Charles 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 "

Application error

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.
>
> > 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!

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!

Re: .htaccess problem

am 31.03.2008 21:31:36 von HansH

"Marshall Dudley" schreef in bericht
news:5i6Ij.44052$G23.36381@newsreading01.news.tds.net...
> HansH wrote:
>>> ... I do see the caching problem though while testing it. I am not sure
>>> how to modify the caching code, Can that be done in the .htaccess file,
>>> or does it need to be done in the httpd.conf file?
>>>
>>
>> Header set Cache-Control "no-cache, no-store"
>> Header set Pragma "no-cache, no-store"
>> Header set Expires "Thu, 01 Jan 1970 00:00:01 GMT"
>>

>>
> Thanks, but when I add that to the .htaccess file, it gives me a server
> error (misconfiguration)
>
Check the error_log for more details.
Most likely a line like
LoadModule headers_module ...../mod_headers...

is missing or disabled in your config.


HansH

--
This product comes without a Rich Text Formatted manual