Tuesday, January 24, 2006

Ruby on Rails routing

To route Ruby on Rails requests, something like the following works for me:

#BEGIN ROR
# General Apache options
#Options +FollowSymLinks +ExecCGI
AddHandler fastcgi-script .fcgi
AddHandler cgi-script .cgi
RewriteCond ${lowercase:%{SERVER_NAME}} domain.com$
RewriteCond ${lowercase:%{REQUEST_FILENAME}} !\.js$
RewriteCond ${lowercase:%{REQUEST_URI}} !\.js$
RewriteRule ^/(.*)$ /var/www/html/hosts/domain.com/docs/ror/public/dispatch.fcgi [QSA,L]
RewriteCond ${lowercase:%{REQUEST_FILENAME}} prototype.js$
RewriteRule ^/(.*)$ /var/www/html/hosts/domain.com/docs/ror/public/javascripts/prototype.js [QSA,L]
# END ROR

0 Comments:

Post a Comment

<< Home

eXTReMe Tracker