How to

Hide file extensions from URL by .htaccess

4 Comments 03 August 2010

To hide an extension from URL, for instance;

Change this url http://simplebyte.net/does/seo.php to http://simplebyte.net/does/seo

copy and paste the following code to your .htaccess file.

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php

Your Comments

4 Comments so far

  1. raj says:

    i tried it but its not working

  2. admin says:

    @Raj, could you show us the site where you are trying to do this ?

  3. raj says:

    <form name='kser' type='POST' action="”>
    Word :

  4. raj says:

    i am a beginner. should i do anything else apart from adding this piece of code what you gave . tell me even though if it was bit silly


Share your view

Post a comment