How setup WordPress blog under Rails’s /public directory
1. Add a rewrite rule to both httpd.conf and /public/.htaccess file:
RewriteCond %{REQUEST_URI} ^/blog.*
RewriteRule .* - [L]
2. Switch blog url from WordPress admin and add this to /public/.htaccess:
RewriteEngine OnRewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
If you deployed your rails app using Passenger(mod_rails), you need to add this to make /blog url work:
<Location /blog>
PassengerEnabled off
</Location>
Advertisement