# Solved: How do I remove the .html or .php from page address?



## Waxbar1 (Aug 3, 2009)

I want the address to show up in the address bar as www.yourdomain.com/superpage not www.yourdomain.com/superpage.html

I'm sure there is a simple command to put into the .htaccess file? Does anyone know this command, or if there isn't one how do I do this?


----------



## Waxbar1 (Aug 3, 2009)

Found a solution, the code to put into the .htacces file is: 

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

and for multiple file extensions just copy and edit lines 2-4:

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


----------

