0

Hi We have moved our site with a new system with a new structure. the domain is the same just structural changes, and I cant seem to get the htaccess right.

Here is what i am trying to accomplish:

move this: http://www.domain.com/chairs/519.htm
to: http://www.domain.com/catalogsearch/result/?q=519

we have over 5000 links so I was hoping that the "?q=" could have the sku number (519) after it dynamically.

Example, if a search was made for anything ending 600.htm it would go to http://www.domain.com/catalogsearch/result/?q=600

any advise is greatly appreciated.

2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by rubberman
0

Hi We have moved our site with a new system with a new structure. the domain is the same just structural changes, and I cant seem to get the htaccess right.

Here is what i am trying to accomplish:

move this: http://www.domain.com/chairs/519.htm
to: http://www.domain.com/catalogsearch/result/?q=519

we have over 5000 links so I was hoping that the "?q=" could have the sku number (519) after it dynamically.

Example, if a search was made for anything ending 600.htm it would go to http://www.domain.com/catalogsearch/result/?q=600

any advise is greatly appreciated.

Ok so i got this working with this:

RedirectMatch /([0-9+].*)\.htm$ http://www.domain.com/catalogsearch/result/?q=$1

but I now realized that not all our links from previous site was uniform, some have a url like http://www.domian.com/Xtra-Tall-Chairs-5200-55-9800.htm granted that my above match rule ignores anything but numbers, but how can i have it take the "55" only so http://www.domain.com/catalogsearch/result/?q=$1 becomes http://www.domain.com/catalogsearch/result/?q=$55

Thanks

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.