regex - .htaccess to load index file for url with variable number of directories? -


lets have directory regions in root:

root/regions 

i want load index.php file located in regions folder if user visits 1 of following:

http://www.example.com/regions/united-kingdom http://www.example.com/regions/united-kingdom/london http://www.example.com/regions/united-kingdom/londom/rm8-16de 

country, city , post code dont exist directory ! how that? thank in advance!

in regions/.htaccess can have .htaccess:

directoryindex index.php rewriteengine on rewritebase /regions/  # if request not valid directory rewritecond %{request_filename} !-d # if request not valid file rewritecond %{request_filename} !-f rewriterule . index.php [l] 

Comments