I have a Zend Framework php application that sits on www.mysite.com that works fine and uses the standard .htaccess file with the following rules.

RewriteEngine on
RewriteRule !\.(js|ico|gif|jpg|png|css|html)$ index.php

I now want to add a wordpress blog on my server using the subdomain of blog.mysite.com. There is a directory called blog, which has the wordpress application in it. I now need to edit the htaccess file to allow the blog directory to display the wordpress blog.

At the moment I am getting a 500 error.

Any ideas as I don't really have a clue, about htaccess and rewrite rules.

Many thanks.

Grant

link|improve this question

57% accept rate
feedback

1 Answer

up vote 2 down vote accepted

You're looking at the wrong bits -- you need to implement VirtualHosts in your Apache config, and the main (default) one is the content that's already running and the new one is your blog.

NameVirtualHost *:80

# first vhost is the default
<VirtualHost *:80>
  ServerName www.mysite.com
  ... other config vars...
</VirtualHost>

<VirtualHost *:80>
  ServerName blog.mysite.com
  ...other config vars
</VirtualHost>

This is how you want to lay out your groundwork, plenty of examples online to help you get your vhosts configured correctly.

link|improve this answer
cheers... after following this (bit of googling) and drinking some coffee got it all sorted out. Thanks. – Grant Collins Jan 6 '10 at 22:59
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.