I-Am-Bot Code, technology and life

11Apr/090

Custom php/apache file extension

Ever wondered how to have you own file extension instead of the boring .php? Just like arstechnica has .ars ? Well with just one line of code, you can make your webserver accept your custom extension!

1. Open the apache httpd.conf file

2. Add the line "AddType application/x-httpd-php .bot" without the quotes. What it does is instruct the server that .bot extension is a php file and that it should be treated as a normal php file

3. Rename your php file with extension bot

4. Open in web browser and see the magic!

Posted by Srinath

Comments (0) Trackbacks (1)

Leave a comment

(required)