我试图关注:rewrite url using mod rewrite without redirection 到目前为止没有成功。
我的域名包含如下目录:
domain.com/sub/
我想允许这些网址选项导航每个:
domain.com/sub => domain.com/sub/index.html?p1=&p2=&full=
domain.com/sub/ => domain.com/sub/index.html?p1=&p2=&full=
domain.com/sub/NUMBER => domain.com/sub/index.html?p1=NUMBER&p2=&full=
domain.com/sub/NUMBER/ => domain.com/sub/index.html?p1=NUMBER&p2=&full=
domain.com/sub/NUMBER1/NUMBER2 => domain.com/sub/index.html?p1=NUMBER1&p2=NUMBER2&full=
domain.com/sub/NUMBER1/NUMBER2/ => domain.com/sub/index.html?p1=NUMBER1&p2=NUMBER2&full=
domain.com/sub/NUMBER1/full => domain.com/sub/index.html?p1=NUMBER1&p2=&full=full
domain.com/sub/NUMBER1/full/ => domain.com/sub/index.html?p1=NUMBER1&p2=&full=full
/sub/.htaccess:
RewriteEngine On
RewriteRule ^([0-9]+)/full(/)*?$ index.html?p1=$1&p2=&full=full
RewriteRule ^([0-9]*)(/)*([0-9]*)(/)*?$ index.html?p1=$1&p2=$3&full=