On 12/09/06, John W. Long <[EMAIL PROTECTED]> wrote:
> Dave Crossland wrote:
> > So ideally I want Apache to serve files that exist, and any that 404
> > to pass to Radiant to serve or acutally 404.
> >
> > Is this possible?
>
> Yes. It should be working this way by default.

Hmm :-/

After playing with my /home/ukktug/radiant/public/.htaccess I got the
behaviour I want working, although it means updating this file each
time a directory/file is added outside of Radiant's control.

-- 8< --
# PrimeHosting
AddDefaultCharset UTF-8

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

# Rewrites
RewriteEngine On

# 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]
#
# Radiant Rewrites
RewriteCond %{REQUEST_URI} ^/robots.txt.*
RewriteRule .* - [L]
RewriteCond %{REQUEST_URI} ^/favicon.*
RewriteRule .* - [L]
RewriteCond %{REQUEST_URI} ^/stylesheets.*
RewriteRule .* - [L]
RewriteCond %{REQUEST_URI} ^/javascripts.*
RewriteRule .* - [L]
RewriteCond %{REQUEST_URI} ^/images.*
RewriteRule .* - [L]

# UKTUG Rewrites
RewriteCond %{REQUEST_URI} ^/Activities/.*
RewriteRule .* - [L]
RewriteCond %{REQUEST_URI} ^/Audio/.*
RewriteRule .* - [L]
RewriteCond %{REQUEST_URI} ^/Baskerville/.*
RewriteRule .* - [L]
RewriteCond %{REQUEST_URI} ^/Committee/.*
RewriteRule .* - [L]
RewriteCond %{REQUEST_URI} ^/Constitution/.*
RewriteRule .* - [L]
RewriteCond %{REQUEST_URI} ^/Membership/.*
RewriteRule .* - [L]
RewriteCond %{REQUEST_URI} ^/Resources/.*
RewriteRule .* - [L]
RewriteCond %{REQUEST_URI} ^/Spreadsheets/.*
RewriteRule .* - [L]
RewriteCond %{REQUEST_URI} ^/TUG/.*
RewriteRule .* - [L]

# For Phil Taylors site archive
DirectoryIndex Index.html

# 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]

# 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 no start"
-- 8< --

-- 
Regards,
Dave
_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to