apache - mod_rewrite with three parameters -
my url:
localhost/categories?dpt=mq==&ctg=mq==&nls=mw==
i want so:
localhost/product-a/departure-a/categories-a/
my htaccess:
<ifmodule mod_rewrite.c> rewriterule ^confirmation/?$ confirmation.php [nc,l] rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule ^/?([^/]+)/?$ products.php?pdt2=$1 [qsa,nc,l] rewriterule ^/?categories/([^/]+)/?$ categories.php?dpt=$1&ctg=$2&nls=$3 [qsa,nc,l] </ifmodule>
but not. wrong?
this version of .htaccess comments inside:
<ifmodule mod_rewrite.c> # stop rewrite if matches existing file or directory rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule .* - [l] # redirect trailing slash rewriterule ^(.+)/$ /$1 [r=301,l,qsa,ne] # confirmation rewriterule ^confirmation$ /confirmation.php [l] # match except slash product rewriterule ^([^/]+)$ /products.php?pdt2=$1 [qsa,l] # match categories rewriterule ^(.+)/(.+)/(.+)$ /categories.php?dpt=$1&ctg=$2&nls=$3 [qsa,l] </ifmodule>
Comments
Post a Comment