URL redirection


I created my shop in repertory : www.monsite.com/shop/ (cscart home page)

And now I would like to change it, and insert my cscart in my root:

www.monsite.com (cscart home page)

How can I do to redirect all my products page present actually in google with www.monsite.com/shop/

to www.monsite.com/

I tried to insert :

header('Status: 301 Moved Permanently', false, 301);
header('Location: adresse_de_la_page_B);

In my product description, but doesn't work. Normal, because I had to insert it at the top html page. But which page or .tpl page? no?

Thanks for your help!


I believe you can do this through .htaccess

Here is a “primer” thread

You may need to do a little more research, but this is close to what you need.

(note the 301 redirect)


I tried to insert :

header( "Status: 301 Moved Permanently", false, 301);
header("Location: http://www.monsite.com");

Ok I found, it's directly in index.php at the root for /shop


Thanks Mike!

Other ask:

if I want to redirect:





I arrived to redirect all my site, to:


But how can I do for a specific page?

It’s OK!!!

Write in root .htacces:

Redirect 301 /shop/page-1 [url]http://www.lmonsite.com/page-1[/url]

after code.


Thanks MikeFold to your link!

by by