Forum Moderators: phranque

Message Too Old, No Replies

.htaccess to redirect server and pages

Moving domains and a new shopping cart.

         

aderouch

9:57 pm on Nov 15, 2007 (gmt 0)

10+ Year Member



This most definitely a newbie question. :)

I have an e-commerce website on a Windows server running a ColdFusion shopping cart.

I purchased a new shopping cart solution with the intent of moving to an Apache server. During the set-up I also decided to change domain names. While I've seen rewrite rules for changing domains and other rules for changing page names, I haven't seen an example of both. It is as simple as specifying www.oldsite.com/old-page.html and www.newsite.com/new-page.html? Can someone point me to an example I can copy and personalize as needed?

Also, my .htaccess file already has some rewrite rules for the new shopping cart (X-cart with the XC-SEO mod). Does it matter where I put the permanent redirects for directing the traffic from the old cart to the new?

Thank you.

zuze

11:17 pm on Nov 15, 2007 (gmt 0)

10+ Year Member



You need to create .htaccess file with one of the following codes -

To move a single page use this:

Redirect 301 /oldpage.html http://www.example.com/newpage.html

where for each page you will create a line of code with the new url

To move entire site, use this code:

Redirect 301 / http://www.example.com/