Hi i have a website there is 5000 pages .php format what i want all php file serve as html if someone type filenam.html then its will serve filename.php. i am godaddy on hosting can any tell me what can do with .htaccess file. Thanks
If you're web site already exists, I assume some search engines have the pages indexed already and with the .php extension, which could result in "duplicate content" and lost page rank. You probably want to supplement Randombase's solution with the following: RewriteEngine on RewriteCond %{REQUEST_URI} ^(.*)\.php RewriteRule .* %1.html [R=301,L] RewriteRule (.*)\.html $1\.php [L] Code (markup): What that does is make sure the user is seeing the pages with the .html extension. If they go to filename.php, they will be redirected to filename.html which will then serve the PHP file transparently. Do you need to handle query strings Rahul? You may need these, if not just for session handling, in which case you will need to do a little more, namely adding QSA flags to the rewrite rules and making sure they are still served SEO friendly to the search engines.