I have a regexp that seems to work fine when tested at regexp101.com but that does not give me the same result within mod_rewrite.
So, the URL I am trying to rewrite is:
/modeles-voiture/Nissan/Qashqai+2
The expected result is:
/modeles.php?brand=Nissan&model=Qashqai+2
The rewrite rule:
RewriteCond %{REQUEST_URI} ^/?modeles-voiture [NC]
RewriteRule \/([A-Z][\-A-Za-z]+)\/([\+\-A-Za-z0-9]+$) /modeles.php?brand=$1&model=$2 [L]
What I am getting out of the rewrite rule is:
/modeles-voiture/Nissan/Qashqai 2
Note the missing + sign, which throws off my script at modeles.php
Thanks for your help.