Mam linki takiego typu: /lng/pg/prm1/prm2/... itd.
Mam takiego .htaccess który przepisuje mi linki:
Kod
RewriteRule ^([^/.]+)/([^/.]+)/([^/.]+)/([^/.]+)/?$ index.php?lng=$1&pg=$2&prm1=$3&prm2=$4 [L]
RewriteRule ^([^/.]+)/([^/.]+)/([^/.]+)/?$ index.php?lng=$1&pg=$2&prm1=$3 [L]
RewriteRule ^([^/.]+)/([^/.]+)/?$ index.php?lng=$1&pg=$2 [L]
RewriteRule ^([^/.]+)/?$ index.php?lng=pl&pg=$1
RewriteRule ^([^/.]+)/([^/.]+)/([^/.]+)/?$ index.php?lng=$1&pg=$2&prm1=$3 [L]
RewriteRule ^([^/.]+)/([^/.]+)/?$ index.php?lng=$1&pg=$2 [L]
RewriteRule ^([^/.]+)/?$ index.php?lng=pl&pg=$1
Wszystko działa poprawnie, jednak problem robi się gdy chcę w którymś parametrze użyć wartości z kropką "." np: 'nazwa_zdjecia.jpg".
Zmieniam reguły na:
Kod
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/?$ index.php?lng=$1&pg=$2&prm1=$3&prm2=$4 [L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/?$ index.php?lng=$1&pg=$2&prm1=$3 [L]
RewriteRule ^([^/]+)/([^/]+)/?$ index.php?lng=$1&pg=$2 [L]
RewriteRule ^([^/]+)/?$ index.php?lng=pl&pg=$1 [L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/?$ index.php?lng=$1&pg=$2&prm1=$3 [L]
RewriteRule ^([^/]+)/([^/]+)/?$ index.php?lng=$1&pg=$2 [L]
RewriteRule ^([^/]+)/?$ index.php?lng=pl&pg=$1 [L]
I pojawia się problem. W tablic $_GET otrzymuję następujące wartości:
<?php ( [lng] => pl [pg] => index.php ) ?>
Jak napisać regułę aby można w parametrach używać wartości z kropkami?
Z góry dziękuję za pomoc.
Pozdrawiam.