[英]How can i redirect html page extension to php using htaccess
我如何使用正確的htaccess重定向將html頁面擴展名重定向到php,類似於與此http://www.hd2wallpapers.com/butterfly_green-wallpapers.html重定向到http://www.hd2wallpapers.com/butterfly_green-wallpapers.php 。
您可以在.htaccess中嘗試
RewriteEngine On
RewriteRule ^(.*)\.html$ $1.php [L]
如果只有這個:
//301 Redirect Old File
Redirect 301 http://www.hd2wallpapers.com/butterfly_green-wallpapers.html http://www.hd2wallpapers.com/butterfly_green-wallpapers.php
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.