An Apache related query
I have a query related to GET requests:
Main site name: rf.com (for example).
subdomain sites: a.rf.com, b.rf.com, c.rf.com, 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 c.rf.com. Now, when someone access the site c.rf.com, it will go to the default site a.rf.com (by means of the alphabetical order priority). Also, if the user types c.rf.com/home/somepage.php, 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 c.rf.com to point to some index.html with "site is disabled" information), in which I can configure a.rf.com'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.
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 10:45 AM.|