I want outside assistance with URL spinning. The situation is comparable with this one.

I've got a working Zend Framework site. Now I have to give a blog in Wordpress (also working). I have selected not to enjoy ZF controller-/action-/route-making I have seen a few lessons relating to this and that i consider them as well much for any "plain" redirection. Now, about this "redirection"...

This is the way it will seem like:

  • www.site.com (indicates /var/www/zf)
  • www.site.com/blog (indicates /var/www/wp)

I understand which i should stop www.site.com/blog to go in ZF's innards and I am presently carrying this out with RewriteRule ^blog - [NC,L] in the .htaccess, but that is about this. As @jason stated, "just pass it right through to Wordpress", but I'm not sure exactly how to achieve that.

Related question:
I never attempted it, but does Apache support this in two different vhosts?
ServerName www.site.com (vhost for ZF site)
ServerName www.site.com/blog (vhost for Wordpress site)

The ServerName trick won't work: you can't have path names inside a ServerName directive.

For mod_rewrite you need to have the ability to pull off something similar to this:

RewriteEngine on
RewriteBase /
RewriteRule ^blog/(.*)$ wp/$1 [L]
RewriteRule ^(.*)$ zf/$1 [L]

world wide web.site.com (indicates /var/www/zf)

world wide web.site.com/blog (indicates /var/www/wordpress)

The easiset method to achive this, where you'll need a sub-hyperlink to point outdoors the VirtualHost directory, would be to create an Alias...

Within the VirtualHost block add:

Alias /blog /var/www/wp
<Directory /var/www/wp>
    Options All
    AllowOverride All
    order allow,deny
    allow from all

This assumes you've PHP enabled in some manner for your directory.