Hosting Rails app and Wordpress on same domain(as folder instead of subdomain)

Hey guys, Yesterday I did an interesting server configuration. Actually we had a rails app hosted on server which is using passenger(a.k.a mod_rails). This application can be access by going to . Also we had a wordpress running which could be access by going to

But, for SEO sake I had to change configuration so that wordpress can be access by instead of

The problem was if I configure wordpress for and go to this url, the request was handled by rails app because of virtualhost.

So what I did? I changed apache virtualhost configuration for and as:

Also I created a symbolic link to wordpress installation directory under rails public folder(ln -s /var/www/html/wordpress /var/www/html/railsapp/blog).

I restarted apache and it worked fine. Wordpress was running at and rails app was as