使用.htaccess将已删除的目录/文件重定向到新位置

使用.htaccess将已删除的目录/文件重定向到新位置,.htaccess,redirect,codeigniter-url,cloaking,.htaccess,Redirect,Codeigniter Url,Cloaking,如何将我的.htaccess修改为新版本,以便直接用户尝试查看我们网站上的旧页面URL?例如: 旧的无效URL:www.mysite.com/128 新网址:www.mysite.com/this-is-the-New-location/321 我希望www.mysite.com/128显示新页面内容。就是这样 //301 Redirect Old File Redirect 301 www.mysite.com/128 www.mysite.com/this-is-the-new-locati

如何将我的.htaccess修改为新版本,以便直接用户尝试查看我们网站上的旧页面URL?例如:

旧的无效URL:www.mysite.com/128

新网址:www.mysite.com/this-is-the-New-location/321

我希望www.mysite.com/128显示新页面内容。

就是这样

//301 Redirect Old File
Redirect 301 www.mysite.com/128 www.mysite.com/this-is-the-new-location/321

//301 Redirect Entire Directory
RedirectMatch 301 www.mysite.com/128(.*) www.mysite.com/this-is-the-new-location/321/$1

你想重定向到该页面或用128 url显示新位置/321的内容?你试过用谷歌搜索吗?你有一段代码已经试过了吗?谢谢你,伙计,我用谷歌搜索了一下,并想出了Redirect/128http://www.mysite.com/this-is-the-new-location/321 这是一个简单的重定向。我更愿意隐藏URL,并在旧URL上显示新页面的内容,以免混淆旧用户。谷歌搜索它也找到了一个工具: