Author Topic: How can I rewrite old url to new url by htaccess?  (Read 2164 times)

fushang

  • Beginner
  • *
  • Posts: 3
    • Ban buon giay dep, Giay dep thoi trang, Sandal, Giay dep dep, bestmart.com.vn
How can I rewrite old url to new url by htaccess?
« on: June 20, 2011, 03:15:40 am »
Hi!
I have a new site, my categories and my products links like "category/View-all-products.html" and "products/flypage.tpl.html". Now i want to rewrite those url to "category.html" and "products.html" by htaccess, but I don't want to lost my google search resutl. So who can tell me how to rewrite old url to new url by htaccess ? My E not goot  ;D
Thank.

fushang

  • Beginner
  • *
  • Posts: 3
    • Ban buon giay dep, Giay dep thoi trang, Sandal, Giay dep dep, bestmart.com.vn
Re: How can I rewrite old url to new url by htaccess?
« Reply #1 on: June 20, 2011, 09:24:20 am »
Finished! Thank for reading!

VM_Fans

  • Jr. Member
  • **
  • Posts: 251
Re: How can I rewrite old url to new url by htaccess?
« Reply #2 on: June 20, 2011, 09:28:43 am »
How did you do this?

TimU

  • Beginner
  • *
  • Posts: 29
Re: How can I rewrite old url to new url by htaccess?
« Reply #3 on: June 21, 2011, 16:25:16 pm »
I highly recommend trying out one of the Joomla SEF plugins.

We use (and love) AceSEF with the Virtuemart extension.
http://www.joomace.net/

The base software is free (with a backlink at the bottom of each SEF-served page), but the Virtuemart extension is $15 or something. Seriously, it's worth every cent.

The best part for us after migrating from an old site, we had the ability to very easily see which pages were generating 404 errors, and redirect them to the correct virtuemart page.

Hope this helps.
Tim
www.Invitations2Impress.com
Personalised Invitations For Every Occasion

We custom design event invitations using your own photos to give an extra personal touch that your guests will love!
All our designs can be made to suit ANY occasion!

fushang

  • Beginner
  • *
  • Posts: 3
    • Ban buon giay dep, Giay dep thoi trang, Sandal, Giay dep dep, bestmart.com.vn
Re: How can I rewrite old url to new url by htaccess?
« Reply #4 on: June 24, 2011, 15:43:33 pm »
I just add this code in .htaccess file :
RedirectMatch 301 (.*)\/View-all-products\.html$ $1.html
and same with products.
Hope this help another!