Forum: Ruby on Rails php within public

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A71bcb92b36f48a83f06f9f0b1273990?d=identicon&s=25 Greg N. (gregnewman)
on 2006-06-09 13:47
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?
30ee518e6fdc5b07e060775b5a542bdb?d=identicon&s=25 Jón Borgþórsson (jongretar)
on 2006-06-09 14:47
(Received via mailing list)
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
>


--
A71bcb92b36f48a83f06f9f0b1273990?d=identicon&s=25 Greg N. (gregnewman)
on 2006-06-09 15:24
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
>>
>
>
> --
This topic is locked and can not be replied to.