Hi brunofontaine and welcome to LQ!
Regarding the first RewriteRule:
Code:
RewriteRule (services/.*) $1 [L] # adjust the regex to what you want.
(services/.*) is the pattern match so matches against a directory or url path
that (minus the domain name) includes and ends with services/
The .* that follows matches any single character and any that follow it.
The $1 in this case is the target and is a variable that holds the value matched in the parenthesis.
Examples:
services/myapp.php will select the target
services/myapp.php and if found will return that to the requestor.
myandroidservices/myapp.php however will still select the target
services/myapp.php and again if found will return that to the requestor.
Note that in a browser the URL will not change to the target even if it is different
as in the second example as this particular rule is a essentially mapping function and not a redirect.
Here is more info on
Mod_Rewrite.
Hope that helps,
Tim