LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-04-2004, 11:01 PM   #1
coolman0stress
Member
 
Registered: Jun 2003
Location: Toronto, Ontario, Canada
Posts: 288

Rep: Reputation: 30
Per folder Apache configuration


Hey guys,

I was wondering about something. This host server i use has php running with Apache, which is exactly what i want. But i want to make a little change. Basically i want an extension such as ".png" to be consider a script, so it would be parsed by php. Why am i trying to do this?

Well, i have a script that outputs an image, so when i link to it i want it to look like an image link, etc, etc...

Now i know how to this Apache change on my own local server, but i don't own the one i use for external work ofcourse.

So is there away to modify or make configuration changes by folder in a remote server? Like maybe an extra file? .htaccess maybe?

Thanks inadvance guys...
 
Old 01-04-2004, 11:17 PM   #2
coolman0stress
Member
 
Registered: Jun 2003
Location: Toronto, Ontario, Canada
Posts: 288

Original Poster
Rep: Reputation: 30
Blah, i hate when this happens, but i managed to find a solution.

A little bit of searching and some Q 'n A with some friends.

Anyway for anyone who might be interested:

What you need to do is create (or modify) the file ".htaccess" in the folder you want to make the configuration change. What you add/edit is the same as the change you would make in your main php ini file (if you had access to it).

The addition i made:
AddType application/x-httpd-php .php .png <-- this way .png files are also parsed by php.

Exactly what i needed...

Thanks anyway and hope this is still usefull for someone!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Display a list of files in a folder in apache Snorideguy Linux - Software 4 02-26-2004 01:05 PM
What is the default folder where Apache is installed? johann519 Linux - Networking 3 01-22-2004 05:08 PM
how to upload files to apache folder? alexii86 Linux - Newbie 4 10-06-2003 02:05 AM
Where is the htdocs folder for Apache? Ekim Gram Linux - Newbie 5 05-24-2003 07:16 AM
apache new folder link zeky Linux - General 6 09-01-2002 07:34 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration