Tsohost.co.uk Forums - UK Web Hosting  
UK Web Hosting Linux Hosting Windows Hosting Domain Name Registration

Go Back   Tsohost.co.uk Forums - UK Web Hosting > Knowledgebase > Clustered Hosting Platform and Windows Hosting

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 3rd May 2010, 08:27 PM
Tsohost Staff Member
 
Join Date: Nov 2006
Posts: 580
Default How do I run PHP scripts with a different file extension?

Sometimes you might want to execute PHP using a non-PHP file extension, for instance you might have an image handling script which you would like to be called imageHander.jpg instead of imageHandler.php.

To accomplish this, create a file called .htaccess in the same directory as the script. The filename must be exact and most text editors will allow you to save a file with this filename. If you already have a .htaccess file, you can edit it. Either way, add the line:

Code:
AddType x-httpd-php .jpg
This will allow .jpg files in that directory to execute as PHP.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 09:45 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2