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.

Recommended Answers

All 3 Replies

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

Ok i got it! thanks for all your help.

Man, are we fast! Superluminal (faster than light speed) for sure! :-)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.