0

My current httpd.conf uncludes:

ScriptAliasMatch ^/$ /qsys.lib/something.lib/index.pgm
ScriptAliasMatch /cgi/(.*) /qsys.lib/something.lib/$1.pgm

We are soon going to have many subdomains, which we setup in a database, meaning that if someone goes to something.domain.com, then we will check in the database if "something" is a valid subdomain and render the page with the data from the database.

I need our main domain, and www.domain to still call the index.pgm, but all other subdomains need to call otherindex.pgm.

http://domain.com needs to call index.pgm
http://www.domain.com needs to call index.pgm
http://*.domain.com needs to call otherindex.pgm

I've been searching the web for 2 days now and had no luck, and I am pretty horrid with regex, so any help is appretiated.

1 Answers1

0

Just create multiple name-based virtualhosts and stuff the flavor of the directive you want in the proper virtualhost?

covener
  • 1,685
  • 9
  • 15
  • Doesn't that require me to create subfolders for each virtual host? All our subdomains template files are in the same subfolder, and it is all handled by cgi and database. This means that no matter if you go to a.domain.com or to b.domain.com you will go to the same subfolder, and the content for each of the pages comes from a database. – tomthorgal Dec 14 '10 at 14:32