I''m working on integrating tiny_mce with rails, which has been very successful so far. I want to use the imagemanger and filemanager plugins for image uploads directly through the editor toolbar, which are php scripts. My first attempt was to modify the .htaccess to prevent apache from routing the requests to rails. Here''s what i''ve got in my htaccess: RewriteCond %{REQUEST_URI} ^/javascripts/tiny_mce.* RewriteRule .* - [L] The scripts live in public/javascripts/tiny_mce/plugins/imagemanager and /filemanager, so I thought handling the entire tiny_mce and all children would take care of it, but it''s only returning a 404. Is there a way to get this to work within my rails app? -- Posted via http://www.ruby-forum.com/.
Since you are using .htaccess I''m guessing Apache is used as webserver. You can just put the PHP scripts in a directory outside Rails. Just put it were your apache HTML files would normally be. Like /var/www/htdocs/tiny_mce Then inside your virtualhost definition you can write: Alias /tiny_mce /var/www/tiny_mce Apache should run normally under /tiny_mce and you should be able to access it like myserver.com/tiny_mce On 6/9/06, Greg Newman <greg@busyashell.com> wrote:> I''m working on integrating tiny_mce with rails, which has been very > successful so far. I want to use the imagemanger and filemanager > plugins for image uploads directly through the editor toolbar, which are > php scripts. My first attempt was to modify the .htaccess to prevent > apache from routing the requests to rails. > > Here''s what i''ve got in my htaccess: > > RewriteCond %{REQUEST_URI} ^/javascripts/tiny_mce.* > RewriteRule .* - [L] > > > The scripts live in public/javascripts/tiny_mce/plugins/imagemanager and > /filemanager, so I thought handling the entire tiny_mce and all children > would take care of it, but it''s only returning a 404. > > Is there a way to get this to work within my rails app? > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- -------------- Jon Gretar Borgthorsson http://www.jongretar.net/
Yes, i''m using apache with fastcgi. For my mint installation, i used the same code in my htaccess, but the mint directory is within my public_html. I will give it a try and see if it''s going to work. J?n Borg??rsson wrote:> Since you are using .htaccess I''m guessing Apache is used as webserver. > You can just put the PHP scripts in a directory outside Rails. Just > put it were your apache HTML files would normally be. Like > /var/www/htdocs/tiny_mce > > Then inside your virtualhost definition you can write: > Alias /tiny_mce /var/www/tiny_mce > > Apache should run normally under /tiny_mce and you should be able to > access it like myserver.com/tiny_mce > > On 6/9/06, Greg Newman <greg@busyashell.com> wrote: >> >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > > > ---- Posted via http://www.ruby-forum.com/.