Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Serving pages with the same extensions

Status
Not open for further replies.

jamesfre

Programmer
Feb 12, 2002
1
US
I apologies that I couldn't come up with a better title. I searched thought the forum and didn't come up with and answer to this questions.

I have 2 files that have the same ending such as .xyz. I can configure Apache to call an external application or even a module when it see files that end with .xyz. However if I have two files that are for different types but have the same extension is there any way to deal with that.

If I was using IIS I can actually define a directory for my first .xyz file and tell it based on that directory what application should handle the .xyz file. I can then set up a different directory and give it a different application to handle my .xyz file.

Can the same thing be done in Apache.?

Thanks
James French
 
Hi,

If you are using 'AddHandler' then you just create directory containers and put the different handlers in each one :

<Directory /var/ AddHandler whatever1 .xyz
</Directory>

<Directory /var/ AddHandler whatever2 .xyz
</Directory>

You can also use 'Sethandler' to force everything for a given url through a handler :

<Location /abc>
SetHandler whatever1
</Location>

See -->
Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top