
April 21st, 2008, 12:55 AM
|
 |
Moderator
|
|
Join Date: Apr 2006
Location: I N D I A
|
|
Redirecting .htm pages to .php
Friends,
Recently a site of mine underwent an overhaul and all the .htm pages were rebuilt in .php
So the extension of the pages changed from .htm to .php and now I want to set up a rule in the htaccess to redirect requests for an old htm page to its corresponding new php page.
As of now, I've entered this code
Quote: RewriteBase /
RewriteRule (.*).htm$ /$1.php |
..and pages of both the versions are now visible [htm and php] instead of a redirection.
I want to set up a redirect through which a request for www.domain.com/filename.htm is redirected to www.domain.com/filename.php
Let me know how to do this.
Thanks!
__________________
SEO FAQs - You might find your answer here.
SEOchat Forum Rules - Read Before You Post
** Do what you feel in your heart to be right- for you'll be criticized anyway. You'll be damned if you do, and damned if you don't.**
|