If there are any.
Which Web server are you using? Apache/Passenger? You might be able to get Apache to handle .php files in the Public folder, since Passenger defers anything static (ish) within that folder directly to Apache. So you would see the request at the Apache level, then Apache would send it off to mod_php and the PHP interpreter, then serve it. Sounds like a lot of fun. Why not use wiki-engine or similar?
Walter
Walter Davis wrote in post #1021691:
Which Web server are you using? Apache/Passenger? You might be able to get Apache to handle .php files in the Public folder, since Passenger defers anything static (ish) within that folder directly to Apache. So you would see the request at the Apache level, then Apache would send it off to mod_php and the PHP interpreter, then serve it. Sounds like a lot of fun. Why not use wiki-engine or similar?
The .php files do not have to be stored in the public folder when using Passenger. For example on my production server I'm running both PHPMyAdmin (PHP) and a Mailman (Python) mailing list all from the same Apache virtual host.
Example:
<Location /phpmyadmin> PassengerEnabled off </Location>
Alias /phpmyadmin/ "/usr/share/phpmyadmin/" Alias /phpmyadmin "/usr/share/phpmyadmin/" <Directory "/usr/share/phpmyadmin/"> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny Allow from all Deny from none </Directory>
<Locagtion /mailman> PassengerEnabled off </Location>
This would allow you to access your PHP Wiki service under whatever Location you want that is not going to conflict with your Rails application.
Example:
As long as you don't have any Rails routes matching the above then it should all work fine.
iframe ?
Alexey Petrushin wrote in post #1021704:
iframe ?
AJAX ? (Assuming you adhere to the same origin policy by running the Wiki under the same domain).
2Robert Walker Thank you! I see )
2Alexey Petrushin wrote in post #1021704:
iframe ?
Ok, if I show wiki in a frame what hapens if I clicked wiki's link?
AJAX ? (Assuming you adhere to the same origin policy by running the
Wiki under the same domain). oops, didn't get that
How can I build a controller, which passes all params and http method of request to wiki and renders wiki's output back to the browser?
Assuming passenger and apache:
I think I would have Apache intercept the wiki URLs and handle them without getting rails involved. That's how I make a wordpress page be completely integrated with a rails app. For instance:
cd path/to/rails/app/public ln -s /path/to/wordpress/installation news
and in Apache:
<Directory "/path/to/rails/app/public/news"> PassengerEnabled off AllowOverride all </Directory>
You can get fancier to get your wiki themed the same as your Rails app, but you can also just keep your wiki's theme up to date manually.