重定向的* .htm为* .PHP [英] Redirect *.htm to *.php

查看:292
本文介绍了重定向的* .htm为* .PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找出如何重定向所有流量的网站上任何的.htm地址页面以.php版本。我希望这将是一个htaccess的规则,但我一直没能找到任何东西,非常适合对我呢,我不是最大的.htaccess的。

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.

任何帮助非常AP preciated。

Any help greatly appreciated.

推荐答案

这将做的工作在你的.htaccess文件:

This will do the job in your .htaccess file:

RedirectMatch 301 (.*)\.htm$ $1.php

这篇关于重定向的* .htm为* .PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆