Publishing System Settings Logout Login Register
Everything you need to know about .htaccess! Massive tutorial!
TutorialCommentsThe AuthorReport Tutorial
Tutorial Avatar
Rating
Add to Favorites
Posted on November 22nd, 2006
8408 views
General Website Development
Changing your file extension

Well there is 2 ways of doing this, both ways work.

First way:

You use code like:

[code]AddType text/html txt[/code]

AddType - Tell the server we are defining file extensions

text/html - What kind of file ( Mime types )

txt - The new file extension

Change txt to the extension you want.

If you have cPanel, you can find a list of Mime types here:

http://yourdomain.com:2082/frontend/x2/mime/mime.html

If not, then use the cPanel demo page:

http://demo.cpanel.net:2082/frontend/x/mime/mime.html

When viewing the demo, if it asks for a username and password. you can find them here


Second Way:

So, this is mod rewrite.

If you want to have a fancy file like: index.lol

You need something like this:

[code]
RewriteEngine On

RewriteRule ^(.*).lol$ $1.php
[/code]

So if you went to wooo.lol it would render as wooo.php

Simple huh.

Next Page
Pages: 1 2 3 4 5 6 7 8 9 10
Dig this tutorial?
Thank the author by sending him a few P2L credits!

Send
Adam

This author is too busy writing tutorials instead of writing a personal profile!
View Full Profile Add as Friend Send PM
Pixel2Life Home Advanced Search Search Tutorial Index Publish Tutorials Community Forums Web Hosting P2L On Facebook P2L On Twitter P2L Feeds Tutorial Index Publish Tutorials Community Forums Web Hosting P2L On Facebook P2L On Twitter P2L Feeds Pixel2life Homepage Submit a Tutorial Publish a Tutorial Join our Forums P2L Marketplace Advertise on P2L P2L Website Hosting Help and FAQ Topsites Link Exchange P2L RSS Feeds P2L Sitemap Contact Us Privacy Statement Legal P2L Facebook Fanpage Follow us on Twitter P2L Studios Portal P2L Website Hosting Back to Top