.htaccess trick to have own name as webpage file extension

Posted By: KP On February 23, 2011 Under Internet, Other, Programming, Web Master Categories

URL is one of the most important factor of Search Engine Optimization. Why not to use file extension as one of the targeting keyword ? Here is a hack to change website file extension to anything you want.

terabug.terabug

Ever noticed some websites using extensions like .ty and .et . How did they manage to execute a .ty file on webserver ? Everything you see on web is HTML. Even PHP files generate HTML code according to process on web server. Flash files are embedded using HTML tags only.

Then how did they got a .ey extension ? They used .htaccess file to hide their original script file extension. Why one would even let others know in which language their script is coded. .htaccess mod_rewrite is one of the best apache features which helps to tweak your server.

I would recommend instead of choosing .ey or .ty as extension utilize it as some important targeted keyword or company name. It helps in SEO.

Check out demo: http://www.terabug.com/tb/index.terabug

You see .terabug is file extension but actually it’s a php file only. I just hided .php to show off terabug as a keyword. The extension can be anything. May be .download for music download site or .quiz for quiz site.

Here is my .htacess file source code:

RewriteEngine On
RewriteRule ^([a-zA-z0-9]+).terabug$ $1.php

First line is just to turn on RewriteEngine.

The next line is saying everything that is .terabug should follow .php

Change the code, upload to your root directory and enjoy site with own extension.



Share with Friends ( Sharing is Caring! )


Subscribe For E-mail Notification Of Article Updates

Enter your email address:

NOTICE:
DO NOT FORGET TO CLICK ON THE VERIFICATION LINK AFTER SUBSCRIBING,THE VERIFICATION MAIL WILL BE SENT TO YOU FROM "FeedBurner Email Subscriptions".
( What is this? Why I need to do this?)

Related Posts

Post a Comment

OR