I have the following Rewrite Rule
RewriteRule ^/product/([^/]*)/([^/]*)/([^/]*)/([^/]*)/((test_data|data_test)/)?([^/]*)$ /product/?query_one=$1&query_two=$2&query_three=$3&query_four=$4&file_path=$6/$7
In last file_path's value I am combining $6/$7.
Is it possible if $6 has no value then file_path will only be $7? I don't want / id $6 is None. In simple I want to put condition in this part.
Edit
https://example.com/product/one/two/three/four/test_data/file.jar
TO
Problem is with this URL
https://example.com/product/one/two/three/four/test_file.xml
Please suggest?
Thanks!