Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mod_rewrite: Redirect from HTML to PHP

Status
Not open for further replies.

iSeriesCodePoet

Programmer
Jan 11, 2001
1,373
US
As a bit of history, I run a MovableType blog. Recently, I have decided to create the pages as PHP instead of HTML, then I can do some cooler things with my site. Well, now I am getting tons of 404 errors in my logs because of this move. So, I would like have have any URL with ".html" to be sent to the exact same name, but with ".php" for the extension. So for example:

mydomain.com/mysite/mypage.html

would come out as

mydomain.com/mysite/mypage.php

or

mydomain.com/mypage.html --> mydomain.com/mypage.php

I would like this to be a redirect so can clean up many of my 404 errors I have been getting. I have been trying to look for examples but haven't found any. If anyone could help me out, it would be work a star! :)

iSeriesCodePoet
iSeries Programmer/Lawson Software Administrator
[pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top