I'm trying to preserve a website's SEO after leaving a provider. The old CMS automatically populated the extension ".php" and the new CMS populates it wihtout the ".php". I also try to place the .php in the url when creating a page, but it sanitizes the "." in the string and thus, what I would like to be "/buying.php" comes out to "/buyingphp".
I am now wondering if I can re-direct a page that I've created through the new cms to re-direct to the .php extension to preserve the seo...but am having difficulty doing so.
Ive tried this 301 redirect but didn't seem to work:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.example.com$
RewriteRule ^selling$ "http\:\/\/www\.example\.com\/buying\.php" [R=301,L]
Anyone have any ideas or suggestions on how to go about redirecting to the buying.php page?
Had also heard that this would work, but hasn't for me:
RewriteCond %{DOCUMENT_ROOT}/$1.php -f
RewriteRule ^(([^/]+/)*[^.]+)$ /$1.php [L]
...this is how my pages are configured within .htaccess
RewriteRule ^([A-Za-z0-9\-]+)$ /page.php?category=$1 [L]
Any Suggestions?