我有一个帐户,有数百个入站链接到他们的日历显示为404(他们把他们的网站移动到一个新的平台)。 我想做一个通配符的查询所有的URL到他们的旧事件日历登陆一个新的静态页面,并为他们的网上商店查询做同样的事情。 我已经尝试了几个变化,但似乎无法得到它的工作。
案例1:我需要redirect这样的url(请注意“showDay”和“showWeek”之间的区别):
calid = 5107976&year = 2011&month = 7&day = 10 apps / calendar / showDay?calID = 5107976&year = 2011&month = 9&day = 10
至:
http://domain.com/events/
情况2:还有这样的url:
应用/networking商店/产品/显示/ 1927074
TO: http : //subdomain.domain.com/
我似乎无法得到所有的URLS和redirect他们的语法正确。 我正在寻找一个像“apps / calendar / *”通配符在命令行中的通配符。
任何帮助表示赞赏!
非常感谢你! 你肯定帮了我!
为了删除查询,我不得不在域名末尾添加一个问号:
RedirectMatch Permanent apps/calendar/?.* http://domain/com/events/? RedirectMatch Permanent apps/webstore/?.* http://subdomain.domain.com/?
对于日历url:
RedirectMatch Permanent apps/calendar/?.* http://domain/com/events/
网店:
RedirectMatch Permanent apps/webstore/?.* http://subdomain.domain.com/
你不需要重写。