Im having a problem getting zend framework to play nicely with subdomains on my server. I have a LAMP stack running on ubuntu 11.10, I am also using a dynamic dns service where I have my zone records defined. So basically my dns is setup like:
DNS:
Registered with one company and point my domain name to the Dynamic DNS’s nameservers here.
With the Dynamic DNS host I have 3 defined zone records of type A:
mydomain.com 000.00.0.0
www.mydomain.com 000.00.0.0
*.mydomain.com 000.00.0.0 <-- wildcard to catch all subdomains
Apache setup:
in /etc/apache2/sites-available :: /sites-enabled
I have my default setup for mydomain and another vhost for mysubdomain.mydomain.com
/var/www :
I have mydomain.com/public /var/www/public folder as its document root
/var/www/mysubdomain :
I have mysubdomain.mydomain.com using /var/www/mysubdomain/public folder as its root
I think all of this is setup correctly because I serve any request to www.mydomain.com correctly, and I also serve any request to www.mysubdomain.mydomain.com correctly.
BUT when I make a request like www.mysubdomain.mydomain.com/:controller or www.mysubdomain.mydomain.com/:controller/:action I am issued a 404 Not Found from the server with the following message:
The requested URL /controller/action was not found on this server.
Im thinking this is an issue with my .htaccess which is setup the following way in
my .htaccess:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* index.php
The thing is that when the application that I am currently trying to access is setup and accessd as a normal domain like www.mysubdomain.com everything works.
I am using the following .htaccess:
Maybe you could try and provide the results.