我怎样才能达到这与mod_rewrite?Url mod_rewrite静态链接页
from:
.com/index.php?menu=home
to:
.com/home
和
from:
.com/index.php?menu=home&list=hello
to:
.com/home/hello
ALSO(不带文件夹hierarki)
from:
.com/index.php?menu=home&list=hello
to:
.com/hello
我用这对第一个:
RewriteRule ^([^/\.]+)/?$ index.php?menu=$1 [L]
但如何我连接他们,如果有多个变量?
试过这样:
RewriteRule ^([^/]*)/([^/]*)?$ index.php?home=$1&list=$2
“多变量”是什么意思?如果你正在讨论GET变量,你需要设置'[L,QSA]'这将会把所有的GET参数传递给你的脚本。例如,如果用户转到'.com/home/hello?testing = variable',它会将它传递给页面。这是你要求的吗? – tftd
更新了我的问题。最后一行。 – user1121487