Ben iyi çalışan bu rewriteRules var:
# 4 params
RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ index.php?app=$1&do=$2&what=$3&id=$4 [NC,L,QSA]
# 3 params
RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ index.php?app=$1&do=$2&what=$3 [NC,L,QSA]
# 2 params
RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ index.php?app=$1&do=$2 [NC,L,QSA]
# 1 param
RewriteRule ^([A-Za-z0-9-]+)/?$ index.php?app=$1 [NC,L,QSA]
Now, i would like that if the url contains /api/
then i would like it to point to a file called public.api.php
but still have those 4 query vars as parameters.
I could arrange that via explicitating all the rules in the order in which they should be processed, but it makes for a quite lengthy .htaccess file.
Benim soru şudur: /api/
istenen URI olduğunu ve index.php
veya {[bu, noktaya göre (eğer kontrol istiyorsunuz koşullu kural çeşit eklemek için bir yol var 2)]} dört sorgu vars işlenmesini yinelenen olmadan?