code snippets:
file name extension change from .shtml to .php
using mod_rewrite in .htaccess

The following bit of code is if you’re just changing site files from .shtml to .php and the file names stay the same. This code should be added to your .htaccess file. Remove the “=301” if this is a temporary change.

RewriteEngine On
RewriteBase /

# Old site redirects
RewriteRule ^(.*)\.shtml $1.php [R,L=301]