httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Evans <tevans...@googlemail.com>
Subject Re: [users@httpd] Cacthing hosts
Date Fri, 26 Feb 2010 17:12:58 GMT
On Fri, Feb 26, 2010 at 4:57 PM, Nilesh Govindarajan <lists@itech7.com> wrote:
> Hi,
>
> I have two domains, example.net and example.com
>
> *.example.net & *.example.com point to the server's IP (Wildcard CNAME).
>
> Now only some subdomains like www, img, etc. are defined on both domains.
>
> I want to catch all other subdomains not configured and raise a 404 error.
>
> How to ?
>
> --
> Nilesh Govindarajan
> Site & Server Administrator
> www.itech7.com
>
>

I don't know about 404, but you can have them raise a 403 easily enough:

<VirtualHost *:80>
  ServerName www.example.com
</VirtualHost>

<VirtualHost *:80>
  ServerName *.example.com
  RewriteEngine On
  RewriteRule ^ - [F]
</VirtualHost>

Cheers

Tom

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message