I have a legacy web application on which I need to set access control based on the URL.
There are only two possibilities: allow from all or allow from my domain.
I believe I can do something like:
<Location /app/one-part>
Allow from all
</Location>
<Location /app/another-part>
Allow from .foo.tld
</Location>
<Location /app/yet-another-part>
Allow from .foo.tld
</Location>
....
The problem is that this particular application has hundreds of /app/thinguie
URLs, and I don't want to code them all like I showed above.
Is there a way to do something like
<Location from file dom.txt>
Allow from .foo.tld
</Location>
<Location from file all.txt>
Allow from All
</Location>
and two files with the /app/whatevers
listed?
thanks in advance.
Oh, by the way, there is no pattern and therefore no regular expression I can use to filter elegantly. :(
DirectoryMatch
directive.echo -e "\t..."
to keep formating and also notice that you should use<Directory>
directive instead of<Location>
for access control.