Possible Duplicate:
remove .php extension with .htaccess
Rightnow my site url is like this:
www.viaviweb.com/about_us.php
i want this to appear like this:
www.viaviweb.com/aboutus
Possible Duplicate:
remove .php extension with .htaccess
Rightnow my site url is like this:
www.viaviweb.com/about_us.php
i want this to appear like this:
www.viaviweb.com/aboutus
You'll have to use RewriteRule with the rewrite engine enable to do this. Create a empty file named .htaccess and put it in the base folder of your website and type this in to the file:
Options +FollowSymlinks
RewriteEngine On
RewriteRule ^aboutus$    about_us.php [L]
Make sure to enable the mod_rewrite module in your Apache server in order to make this work properly. Read more about rewrite in Apache here: http://httpd.apache.org/docs/current/mod/mod_rewrite.html
 
    
    You have to create some rules in .htaccess, in you main folder you have a file named .htaccess (if it's not available you have to create one) and put these rules.
RewriteCond %{HTTP_HOST} ^www\.domain\.com
RewriteCond %{THE_REQUEST} ^GET\ (.*)\.php\ HTTP
RewriteRule (.*)\.php$ $1 [R=301]
 
    
     
    
    How to remove .php extension using URL Rewriting / mod_rewrite
I hope this might be helpful to you.
 
    
    RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.]+)$ $1.php [NC,L] 
RewriteRule about_us.php(.*)$ aboutus?$1 [L,QSA]
