I want to have a default folder when the folder does not exist in the VirtualDocumentRoot
, I have this code:
<VirtualHost *:80>
ServerAlias *.development
UseCanonicalName Off
VirtualDocumentRoot /usr/local/apache2/sites/htdocs/subdomains/%1/public_html
# Something like
VirtualDocumentRootFallback /usr/local/apache2/sites/htdocs/subdomains/default/public_html
</VirtualHost>
ErrorDocument 404
does not work for me because I need it to be a folder.
Edit (Solved): I write a Apache module based on mod_vhost_alias: mod_vhost_alias_fallback