Q:

WSGIScriptAlias does but WSGIScriptAliasMatch DOES NOT regard DirectoryIndex

this is my a.conf in /etc/httpd/conf.d/
rather than edit httpd.conf i simply work with a.conf
NameVirtualHost *:80

<VirtualHost *:80>
DirectoryIndex 1
DocumentRoot /a/b/
ServerName domain.tld
WSGIScriptAlias /1 /a/1.wsgi
WSGIScriptAlias /2 /a/2.wsgi
</VirtualHost>

in this example if i go to domain.tld via web.. 
WSGIScriptAlias /1 /a/1.wsgi

is automatically executed.  
but let's get rid of WSGIScriptAlias and use WSGIScriptAliasMatch instead. 
<VirtualHost *:80>
DirectoryIndex 1
DocumentRoot /a/b/
ServerName domain.tld
WSGIScriptAliasMatch ^/(.*)  /a/$1.wsgi
</VirtualHost>

now.. when i go to domain.tld via web.. i do not see 1.wsgi
instead it is the default apache welcome page.  
so looks like.. 
WSGIScriptAliasMatch ^/(.*)  /a/$1.wsgi

is not paying any attention to 
DirectoryIndex 1

in other words via web domain.tld/1 works but domain.tld does not..
what is causing this ? 
how is it that 
WSGIScriptAlias /1 /a/1.wsgi

can interpret domain.tld as domain.tld/1 given the DirectoryIndex 1
but..
WSGIScriptAliasMatch ^/(.*)  /a/$1.wsgi 

can not interpret domain.tld as domain.tld/1 given the DirectoryIndex 1 
? 
once i solve this issue i plan on ensuring only numbers 1 to 99 are accepted and directed to wsgi scripts. 
in other words.. domain.tld/1  (index) to domain.tld/99 which would point to 99.wsgi
in other words i understand (.*)  might be a security issue.. but first i want to solve the issue of why.. DirectoryIndex is not being regarded.. by WSGIScriptAliasMatch.. when it is regarded just fine by 
WSGIScriptAlias
if i fail to solve this problem.. i will have to use perhaps 99 lines of..
WSGIScriptAlias /1 /a/1.wsgi
WSGIScriptAlias /2 /a/2.wsgi
WSGIScriptAlias /3 /a/3.wsgi
...
WSGIScriptAlias /99 /a/99.wsgi

in a.conf
which might be less logical. 
all because DirectoryIndex would not work with WSGIScriptAliasMatch as it does with WSGIScriptAlias

A:

Try:
WSGIScriptAliasMatch ^/(.+) /a/$1.wsgi

You are matching '/', and mapping it to '/a/.wsgi'.  Ensure there is at least one character after the '/' and better still perhaps ensure they are numbers if that is the scheme you are going to use. 
WSGIScriptAliasMatch ^/([1-9][0-9]*) /a/$1.wsgi

