-   Linux - Newbie (
-   -   An Apache related query (

saagar 03-25-2011 03:12 AM

An Apache related query
I have a query related to GET requests:

Main site name: (for example).

subdomain sites:,,, etc.

Web server: Apache.

All the above-said sites run in the same server via virtual hosting.

My question is as follows:

Suppose I disable the site Now, when someone access the site, it will go to the default site (by means of the alphabetical order priority). Also, if the user types, there will be a log in /var/log/httpd/c.rf.com_access.log will have this entry and as well as the corresponding app's log will also be filled with this error.

Is there a way (without changing the DocumentRoot of to point to some index.html with "site is disabled" information), in which I can configure's virtual host that if a page is not relavent then not go to the app's log, but provide a suitable message...?

Please let me know in case I am not clear to you.



saagar 03-25-2011 03:23 AM


I think what I need is something like this:

A RewriteRule that will compare the sitename (ServerName) with the incoming request sitename and if both are same then allow it, else go to an index page, saying "not found", so that it wont go to the app and fill it will log entries.


All times are GMT -5. The time now is 08:24 AM.