Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.


share|improve this question

1 Answer 1

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 *:80>
  ServerName blog.mysite.com
  ...other config vars

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

share|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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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