Hi there i have made my all pages with .html extension and hence my SEO is based on accordingly. Now i made some changes to htaccess that causes to not inclusion of header and footer pages (both are made with .php extension ). so i decided to change the extension of pages (.html to .php) and it wokrs. due to SEO and large number of pages i want all my pages .php (made later). to get converted automatically with .html in browser. so is it possible using .htaccess rewrite. if yes then please suggest the steps ??
Below is the code you can use so that .php pages are redirected to .html #Redirects if a request for a php files comes in. RewriteCond %{REQUEST_URI} .php$ RewriteRule ^(.*)\.php.?$ $1.html [R=301,L] #Rewrites requests for html files to find the php file on disk. RewriteRule ^(.*)\.html$ $1.php OR RewriteRule ^(.*)\.html$ $1.php [L]