Take the 2-minute tour ×

I have Windows 7 + Zend server

In httpd.conf file i have:

NameVirtualHost *:80

    <VirtualHost *:80>
        ServerAdmin keyne@localhost
        ServerName local-izbori.bg
        ServerAlias *.local-izbori.bg
        DocumentRoot "C:\Program Files\Zend\Apache2\htdocs\izbori-www"
         <Directory 'C:\Program Files\Zend\Apache2\htdocs\izbori-www'>
                DirectoryIndex index.php
                AllowOverride All
                Order allow,deny
                Allow from all


in windows host file: local-izbori.bg

And in my .htaccess file:

Options +FollowSymLinks

RewriteEngine on

RewriteRule !\.(js|ico|gif|jpg|png|css|php|doc|docx|pdf|swf|htm|php|htc)$ index.php

url rewrite work find, ex: local-izbori.bg/members/register/

but dynamic subdomain, like http://ruse.local-izbori.bg/ruse return: Server not found

is there any way to do all subdomain to go to index.php ?

share|improve this question

1 Answer 1

Look into wildcard subdomains. In order for them to work you need to add that subdomain to your DNS. I asume you are on windows. Unfortunately windows does not support wildcard definition so you will have to add a line for each subdomain to your hosts file.

share|improve this answer

Your Answer


