Apache - subdomains, mod_rewrite and virtualdocumentroot?

The scenario you want to set up can be implemented with mod_vhost_alias for Apache httpd You just need to create a default virtual host to catch the non-existing subdomains, see An In-Depth Discussion of Virtual Host Matching for details Example: VirtualHost _default_:80> ServerName example. Com DocumentRoot /srv/www/custom_page # ... UseCanonicalName Off VirtualDocumentRoot /srv/www/%1/%2.

The scenario you want to set up can be implemented with mod_vhost_alias for Apache httpd. You just need to create a default virtual host to catch the non-existing subdomains, see An In-Depth Discussion of Virtual Host Matching for details. Example: ServerName example.Com DocumentRoot /srv/www/custom_page # ... UseCanonicalName Off VirtualDocumentRoot /srv/www/%1/%2.

I tried this, exactly as you wrote above. But it does not go to custom_page for mistyped subdomains (or any non-existing url) still. All modules are enabled, apache restarted.

– JP19 Nov 1 '10 at 13:16.

What you're describing can be done with DNS, and you'll have to use wildcards to pull it off.

The DNS with wildcard has already been setup and working fine. Requests to *.mydomain. Com are coming to my server.

Its just that I want to i) have ability to dynamically add subdomains without reconfiguring apache or anything, and at the same-time redirect mistyped domains to my homepage (or something like that). – JP19 Nov 1 '10 at 13:22 Then joschi is right. – Andrew Sledge Nov 1 '10 at 17:45.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions