UK Webmaster Talk - Online Marketing - SEO


 

Your own php file extensions

This is a discussion on Your own php file extensions within the Programming Articles forums, part of the Webmaster Articles/Tutorials category; Have you ever wanted to have your own extensions? You could just rename any file any extension, using an ftp ...


Go Back   UK Webmaster Talk - Online Marketing - SEO > Webmaster Articles > Webmaster Articles/Tutorials > Programming Articles

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Notices

Reply

 

LinkBack Thread Tools Display Modes
Old 12-04-2005, 00:04   #1 (permalink)
Tim
Cool Newbie
 
Join Date: Apr 2005
Posts: 32
iTrader: 0 / 0%
Tim is just really nice
Default Your own php file extensions

Have you ever wanted to have your own extensions? You could just rename any file any extension, using an ftp client. But what if you want to execute php inside of your own extension?

This is as easy as a simple .htaccess trick, which means your server has to be Apache.

Step 1: Open up your .htaccess file in your favorite text editor.

Step 2: If there is text in your .htaccess, go to the last line and press enter.

Step 3: Type the following line of text:
Code:
AddType application/x-httpd-php .ext1 .ext2 .ext3
As you can see, you can change your .ext1 .ext2 and .ext3 to whatever you'd like. You can remove extensions -- or add them, just add a space and a .yourextensionhere , and you're in Emoticon Make sure you keep all of them on the same line though, or undesired effects can come out.

Step 4: Save your .htaccess file, and upload it to your webserver

Step 5: Rename your files to your liking, and now php will be executed in them (if you set their extensions correctly as above)

Have fun!
Tim is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
extensions, file, php

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

Similar Threads

Thread Thread Starter Forum Replies Last Post
Need File Sharing softfalls General Webmaster Discussion 0 15-07-2008 18:41
.htaccsess file HELP PLEASE KF1 General Webmaster Discussion 0 28-06-2005 20:06
Amazing File Hosting Site For Sale Departed Websites For Sale 18 26-06-2005 12:00
Automatic Cross-Server File Storage Wistow Php and MySQL 29 07-06-2005 11:12
help with .iso file robertall General Webmaster Discussion 10 16-04-2005 14:53


All times are GMT +1. The time now is 18:53.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
UK Webmaster Forum © WebmasterTalk.co.uk | Design by Forbairt

Ad Management by RedTyger

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41