Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redirect *.htm to *.php

I am trying find out how to redirect all traffic on a website from any .htm address to a .php version of the page. I am hoping it will be a .htaccess rule but I have not been able to find anything that quite fits for me yet and I am not the greatest with .htaccess.

Any help greatly appreciated.

like image 841
dibs Avatar asked Dec 14 '25 10:12

dibs


1 Answers

This will do the job in your .htaccess file:

RedirectMatch 301 (.*)\.htm$ $1.php
like image 189
Marcus Whybrow Avatar answered Dec 16 '25 23:12

Marcus Whybrow



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!