Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to pass more than 9 parameters in the file. htaccess (mod_rewrite)?

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?

like image 240
Felipe Avatar asked Dec 27 '22 23:12

Felipe


1 Answers

The answer is simple: You cannot.

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.

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.

like image 92
LazyOne Avatar answered Jan 13 '23 14:01

LazyOne