Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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

share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.