Hello everyone,
I am trying to use the ForceType directive of apache
to get more readable urls, like this php based example:
<Files *>
ForceType application/x-httpd-php
</Files>
Does anyone know what is the equivalent of
application/x-httpd-php for mod_ruby?
I tried the following but failed:
AddType application/x-httpd-ruby .sx
AddHandler ruby-object .sx
<Files *>
ForceType application/x-httpd-ruby
</Files>
Any help will be really appreciated!
George Moschovitis
One other approach that I've used is to use mod_rewrite to cause some
scripts to be interpreted as ruby scripts. In this case I am causing
certain URLS to be transparently redirected to a fastcgi script that
happens to be a ruby script:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteLog logs/rewrite_log
RewriteLogLevel 0
# don't use controller to process requests for static files
RewriteCond %{REQUEST_URI} .*\.(gif|jpg|png|css|js)$
RewriteRule .* - [L]
# send all other requests into the controller ruby script
RewriteRule ^.*$ /controller.fcgi [L,T=fastcgi-script]
</IfModule>
···
On Tue, 22 Jun 2004 20:28:12 +0900, George Moschovitis <gm@navel.gr> wrote:
Hello everyone,
I am trying to use the ForceType directive of apache
to get more readable urls, like this php based example:
<Files *>
ForceType application/x-httpd-php
</Files>
Does anyone know what is the equivalent of
application/x-httpd-php for mod_ruby?
I tried the following but failed:
AddType application/x-httpd-ruby .sx
AddHandler ruby-object .sx
<Files *>
ForceType application/x-httpd-ruby
</Files>
Any help will be really appreciated!
George Moschovitis
Can't answer directly , but isn't this the same as
<Files *>
SetHandler ruby-object
RubyHandler Apache::ERubyRun.instance
</Files>
(for eruby)
or
<Files *>
Options +ExecCGI
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Files>
(for ruby cgi type scripts)
I'd replace the <Files> above with a <FilesMatch> to
exclude images etc.
* George Moschovitis <gm@navel.gr> [0631 12:31]:
···
Hello everyone,
I am trying to use the ForceType directive of apache
to get more readable urls, like this php based example:
<Files *>
ForceType application/x-httpd-php
</Files>
Does anyone know what is the equivalent of
application/x-httpd-php for mod_ruby?
I tried the following but failed:
AddType application/x-httpd-ruby .sx
AddHandler ruby-object .sx
<Files *>
ForceType application/x-httpd-ruby
</Files>
Any help will be really appreciated!
George Moschovitis
--
Mosher's Law of Software Engineering:
Don't worry if it doesn't work right. If everything did, you'd
be out of a job.
Rasputin :: Jack of All Trades - Master of Nuns