如何在文件中传递9个以上的参数. htaccess(mod_rewrite)? [英] how to pass more than 9 parameters in the file. htaccess (mod_rewrite)?

查看:83
本文介绍了如何在文件中传递9个以上的参数. htaccess(mod_rewrite)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,如果我通过参数$ 10 ="something",则无法在mod_rewrite apache的htaccess文件中花费9个以上的参数.mod_rewrite通过参数$ 1的值. ?

I'm having trouble spending more than nine parameters in. htaccess file with mod_rewrite apache, for example, if I pass the parameter $ 10 = "something" mod_rewrite passes the value of parameter $ 1. Is there any solution for this?

推荐答案

答案很简单:您不能.

http://httpd.apache.org/docs/current/mod/mod_rewrite.html

您唯一可以做的就是将一些参数分组为一个参数,然后稍后在脚本中对其进行解析.

The only thing you can do is to group some parameters into one and then parse it later in your script.

当然,您可以尝试将模式分成2个规则,因此一个规则匹配5个或6个参数,然后第二个规则匹配其余的参数(这将起作用,因为规则是一个一个地执行的),但并非总是如此工作(真的取决于实际的重写规则,它的复杂程度),并且需要您在做什么方面的知识.

Of course, you can try splitting your pattern into 2 rules, so one rule matches 5 or 6 parameters, and then 2nd rule matches the rest (this will work because rules are executed one by one), but that will not always work (REALLY depends on actual rewrite rule, how complex it is) and requires good knowledge on what are you doing.

这篇关于如何在文件中传递9个以上的参数. htaccess(mod_rewrite)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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