I'm trying to point multiple domains at specific routes in my Zend
application.

For example:

I want to have 
http://mydomain.com act as if I went to
http://localhost/zend_project/public/mydomain
and have 
http://myotherdomain.com act as if I went to
http://localhost/zend_project/public/myotherdomain

Where my index.php and .htaccess file resides in /zend_project/public

Here is my setup thus far running wamp2:

windows/system32/drivers/etc/hosts
i added 127.0.0.1 mydomain.com 


wamp\bin\apache\apache2.2.6\conf\httpd.conf
uncommented
#Include conf/extra/httpd-vhosts.conf


wamp\bin\apache\apache2.2.6\conf\extra\httpd-vhosts.conf

NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot "c:/wamp/www"
ServerName localhost
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "c:/wamp/www/zend_project/public/mydomain"
ServerName mydomain.com
</VirtualHost>


wamp\www\zend_project\public\.htaccess

php_flag magic_quotes_gpc off

RewriteEngine on
RewriteRule !\.(htm|js|ico|gif|jpg|png|css|xls|pdf|doc|swf|xml)$ index.php


When I browse to http://mydomain.com I get "400 Bad Request". If I remove
the .htaccess file, it will go to the url (which points to
/zend_project/public/mydomain) fine (but zend wont work of course).

Does anyone have any advice on how to get this working, or any advice on a
better way of accomplishing having different domains pointing at different
routes in a Zend application.

Thanks
-- 
View this message in context: 
http://www.nabble.com/Domain-routing-tp17544769p17544769.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to