Forum: Ruby on Rails Rails/Wordpress/Apache/Passenger - not working with custom permalinks

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.
Dfe81d0ef18761dc22d0586b7b58c5ac?d=identicon&s=25 Rob Zolkos (rzolkos)
on 2009-02-08 18:04
(Received via mailing list)
Hi,

I'm trying to get an installation of wordpress working in a blog
directory under /public in a rails app.  The webserver is Apache using
phusion passenger.

I've tried following the instructions in this blog post
http://www.igvita.com/2007/07/04/integrating-wordp...

Everything works fine if I just use the normal Wordpress permalink
structure.  However, once I customise the permalinks none of the
patterns seem to be being matched in my .htaccess and the request
passes to the rails router where it of course fails.

This is in my .htaccess

  RewriteBase /blog/
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} ^/blog/\d+.*
  RewriteRule . /blog/index.php [L]
  RewriteRule ^/blog$ /blog/index.php [QSA]
  RewriteRule ^(/blog.*/$)$ $1/index.php [QSA]
  RewriteRule ^/blog/?(.*)$ %{DOCUMENT_ROOT}/blog/$1 [NC,QSA,L]

Hopefully someone on this list can help.

Thanks,
r
This topic is locked and can not be replied to.