Php 如何为以下内容设置301永久重定向?
我想知道如何为以下路径设置301永久重定向 From:/restaurants/casa-villa.html 前往:餐厅/卡萨别墅 谢谢!Php 如何为以下内容设置301永久重定向?,php,mod-rewrite,redirect,Php,Mod Rewrite,Redirect,我想知道如何为以下路径设置301永久重定向 From:/restaurants/casa-villa.html 前往:餐厅/卡萨别墅 谢谢! 杰克你确定要这样做吗?我想你可以在Apache中别名/重写它(假设你在LAMP上)。那么,如果有100个restarnts,我可以传递什么变量来删除.html? RewriteEngine On RewriteBase / RewriteRule restaurants/(.*).html /restaurants/$1 [R=301,L]
杰克你确定要这样做吗?我想你可以在Apache中别名/重写它(假设你在LAMP上)。那么,如果有100个restarnts,我可以传递什么变量来删除.html?
RewriteEngine On
RewriteBase /
RewriteRule restaurants/(.*).html /restaurants/$1 [R=301,L]