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

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -