.htaccess - Redirect 301 Not working the way I intended it to! -


trying simple 301 redirect htaccess using code: redirect 301 /cat/radiator-cages/product/radiator-support-cage/ http://www.mysite.com/product/radiator-cages/custom-radiator-support-cage/

the results sending me http://www.mysite.com/product/radiator-cages/custom-radiator-support-cage/?page=cat/radiator-cages/product/radiator-support-cage

any idea i'm doing wrong? in advance help.

--update--

rewritecond %{http_host} ^mysite.com [nc]  rewriterule ^(.*)$ http://www.mysite.com/$1 [l,r=301] rewriterule ^product/(.*)/(.*)/$ /index.php?page=product&parent_url=$1&product=$2 [l,nc]  redirect 301 /cat/radiator-cages/product/radiator-support-cage/ http://www.mysite.com/product/radiator-cages/custom-radiator-support-cage/ 

i suggest trying use redirect 301 statement first.

your htaccess should somthing this

    redirect 301 /cat/radiator-cages/product/radiator-support-cage/ http://www.mysite.com/product/radiator-cages/custom-radiator-support-cage/     rewriteengine on     rewritecond %{http_host} ^mysite.com [nc]      rewriterule ^(.*)$ http://www.mysite.com/$1 [l,r=301]     rewriterule ^product/(.*)/(.*)/$ /index.php?page=product&parent_url=$1&product=$2 [l,nc] 

edit:

   rewriteengine on    rewritecond %{http_host} ^mysite.com [nc]     rewriterule ^(.*)$ http://www.mysite.com/$1 [l,r=301]    rewriterule ^/cat/radiator-cages/product/radiator-support-cage/$ http://www.mysite.com/product/radiator-cages/custom-radiator-support-cage/ [r=301,l]    rewriterule ^product/(.*)/(.*)/$ /index.php?page=product&parent_url=$1&product=$2 [l,nc]  

http://www.gerronmulder.com/common-seo-rewrite-rules-for-apache-using-htaccess/


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -