我想将我的所有页面从旧类别重定向到新类别。
http://mywebsite.com/old/page1至http://mywebsite.com/new/page1 http://mywebsite.com/old/page2至http://mywebsite.com/new/page2
这不起作用
library(dplyr)
library(tidyr)
df %>%
mutate(row = row_number()) %>%
gather(key, value, -c(1:2, row)) %>%
group_by(row) %>%
slice(if(is.na(first(Pol_Month))) 1:12 else {ind = max(match(first(Pol_Month), month.name), 4); ind : (ind + 11) }) %>%
mutate(key = paste0("Month", 1:12, "_APE")) %>%
spread(key, value) %>%
select(-row)
答案 0 :(得分:0)
找到了解决方案
RedirectMatch 301 /old/(.*)/ new / $ 1