I have index.php where it set the language with index.php?lang=de. English is the default language which I don't need to use index.php?lang=en
When the language is set it use this condition in htaccess
RewriteRule ^([a-zA-Z0-9\-_]+)/$ /index.php?lang=$1 [L]
When the language is not set
RewriteRule ^([a-zA-Z0-9\-_]+)$ /index.php?pag=$1 [L]
When language and page is set
RewriteRule ^([a-zA-Z0-9\-_]+)/([a-zA-Z0-9\-_]+)$ /index.php?lang=$1&pag=$2 [L]
When language, page, and sub-page is set
RewriteRule ^([a-zA-Z0-9\-_]+)/([a-zA-Z0-9\-_]+)/([a-zA-Z0-9\-_]+)$ /index.php?lang=$1&pag=$2&spag=$3 [L]
But I can't access sub-page when the language is not set, when is english it must to be
index.php?pag=services&spag=web_design
RewriteRule ^([a-zA-Z0-9\-_]+)/([a-zA-Z0-9\-_]+)$ /index.php?pag=$2&spag=$3 [L]
Any idea how to make it work? Also if you have an idea to merge all this line in a single one will be wonderful.
Thanks!