可以mod_rewrite的做数学题? [英] Can mod_rewrite do math?

查看:149
本文介绍了可以mod_rewrite的做数学题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我计划我的网站转换为新的CMS,但我想用mod_rewrite的老无缝链接重定向到新的位置。

I am planning to convert my website to a new CMS, but I would like to use mod_rewrite to seamlessly redirect old links to their new locations.

美中不足的是,我的新博客将不会有同样的文章编号,如旧,因为我会在他们的第一个导入一些较老的博客条目。因此,我的mod_rewrite需要采取像 old.php?文章的URL = 125 ,做加法找出新的文章编号(比如+200,在这个例子),并重定向到 new.php?I = 325

The catch is that my new blog will not have the same article numbers as the old, because I'll import some older blog entries in their first. Thus, my mod_rewrite would need to take a URL like old.php?article=125, do the addition to figure out the new article number (say +200, for this example), and redirect to new.php?i=325.

能否mod_rewrite的做自己的加法,还是我将需要某种形式的'助手'脚本来做到这一点?

Can mod_rewrite do the addition on its own, or am I going to need some kind of 'helper' script to do that?

推荐答案

它不能做数学。也许你想使用改写地图

It can not do math. Maybe you want to use a rewrite map.

这篇关于可以mod_rewrite的做数学题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆