如何重定向所有链接:
import sys
import matplotlib.pyplot as plt
import numpy as np
def drawMedian(ctype, filename, title, yaxis, comp, *args):
plt.switch_backend('Qt4Agg')
fig = plt.figure(figsize=(10,6))
ax = fig.add_subplot(1,2,1)
medians = []
for v in comp:
medians.append(np.median(v))
col = ['r','b','g','y','c','m']
ax.grid(b=True, linestyle='-', which='both', linewidth=2, alpha=0.3)
ax.bar( range(1, (int(ctype))+1), medians, align='center', color=col[0: int(ctype)] )
plt.title(title)
labels = [i for i in args]
plt.ylabel(yaxis +' (median)' )
plt.xticks(range(1, (int(ctype)) + 1), labels)
plt.savefig(filename+' (median).png', bbox_inches = 'tight')
plt.xticks()
以
http://www.babynames.ir/esm/oldcat/page1/number/...
oldcat - > newcat
我正在使用: 永久链接查找器和404重定向但混乱所有链接。 使用重定向插件但无法设置参数...
答案 0 :(得分:0)
如何使用像这样的htaccess
在RewriteEngine On
RedirectMatch 301 http://www.babynames.ir/esm/oldcat/(.*) http://www.babynames.ir/esm/newcat/$1
或者可能是这样的
RewriteRule ^oldcat/?$ $1/newcat$2 [R=301,L]