次の書き換えルールがあります
RewriteRule ^/product/([^/]*)/([^/]*)/([^/]*)/([^/]*)/((test_data|data_test)/)?([^/]*)$ /product/?query_one=$1&query_two=$2&query_three=$3&query_four=$4&file_path=$6/$7
ラストfile_path
の値で組み合わせて$6/$7
います。
$6
値がない場合file_path
は可能$7
ですか? /
ID$6
がNoneになりたくない。シンプルにこの部分にコンディションを入れたい。
編集
https://example.com/product/one/two/three/four/test_data/file.jar
に
問題はこの URL にあります
https://example.com/product/one/two/three/four/test_file.xml
提案してください?
ありがとう!