我完全不知道如何使用.htaccess,我在哪里遇到了问题;我把我的网站从一个平台(joomla)迁移到了另一个平台上(wordpress)。
在这样做的时候,我已经失去了与旧链接的连接
下面是一个旧的链接的例子
http://website.com/home/kimberly-wallace-releases-a-delicious-childrens-book-grandmas-chocolate-cake-.html
我想使用.htaccess删除"/home"answers"-.html"。然后重定向到修改后的 url
http://website.com/kimberly-wallace-releases-a-delicious-childrens-book-grandmas-chocolate-cake
如果有任何意见,我将不胜感激——谢谢!
类似的东西应该适用于该URL:
RewriteEngine on
RewriteRule ^home/(.*).html$ /$1 [L,R=301]
如果你有其他不同格式的URL,那么你需要编写更多的规则。