.htaccess基于数值的重写规则
我想在htaccess上执行重写规则。应重写以下URL: 我想制作一个重写URL,识别“-p”,然后是一个数值。我如何制定这个规则?我有以下内容,但不确定如何向其中添加数值:.htaccess基于数值的重写规则,.htaccess,url-rewriting,.htaccess,Url Rewriting,我想在htaccess上执行重写规则。应重写以下URL: 我想制作一个重写URL,识别“-p”,然后是一个数值。我如何制定这个规则?我有以下内容,但不确定如何向其中添加数值: RewriteRule ^(.*)/(.*)/(.*)/(.*)-p(.*)/?$ /file.php?folder=$1&subfolder=$2&subsub=$3&product=$4&id=$5 但是,在以下URL的情况下,这当然是错误的: 如何添加URL应以“-p”结尾并后跟
RewriteRule ^(.*)/(.*)/(.*)/(.*)-p(.*)/?$ /file.php?folder=$1&subfolder=$2&subsub=$3&product=$4&id=$5
但是,在以下URL的情况下,这当然是错误的:
如何添加URL应以“-p”结尾并后跟一个数值的条件?p([0-9]+)应起作用。p([0-9]+)应起作用。