0

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

1 Answer 1

2

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.

1
  • cheers... after following this (bit of googling) and drinking some coffee got it all sorted out. Thanks. Jan 6, 2010 at 22:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .