i face the following problem:
My folder structure in the server is: public_html/projects/
Tree view: folder structrure tree view
In the public_html folder there is an .htaccess file.
Inside the projects folder my partners will create numerus folders with a landing page inside (let's say just an index.php file)
The rewrite rules that i try to apply is a language and a currency url parameters.
So, for example this url: https://www.example.com/projects/whatever-project-name/index.php?lang=en¤cy=eur
has to be translated to: https://www.example.com/projects/whatever-project-name/en/eur/
Also, the currency variable is optional. (The language variable is a mandatory variable)
So the urls may be something like this too: https://www.example.com/projects/whatever-project-name/en/
I'm searching and trying (and crying) a couple of days now in order to solve this problem. The only one solutions that is close to mine is this: RewriteRule for unknown directory
but i didn't manage to make it work.
What i have till now (but it doesn't work properly) is:
RewriteEngine On
RewriteRule ^(.*/)?/([a-zA-Z0-9]{2,3})/([a-zA-Z0-9-]+)/?$ projects/$1index.php?lang=$2¤cy=$3
RewriteRule ^(.*/)?/([a-zA-Z0-9]{2,3})/?$ projects/$1index.php?lang=$2[L]