| Someone check my rewrite syntax? Thanks! [message #676] |
Fri, 08 December 2006 18:28  |
casca9 Messages: 2 Registered: December 2006 |
|
|
|
Trying to take any url that matches the following format:
http://www.cascadefire.com/cgi-bin/cfcart/cart.cgi?partno=!P ART NUMBER HERE!
..and craft it so that it is redirected to:
http://www.cascadefire.com/cfeproducts/advanced_search_resul t.html?keyword=!PART NUMBER HERE!&search_in_description=1
(both minus the exclamation points)
So far in my .htaccess file I have this:
RewriteEngine on
RewriteRule ^http://www.cascadefire.com/cgi-bin/cfcart/cart.cgi\?partno=([0-9]+)$ http://www.cascadefire.com/cfeproducts/advanced_search_result.html?keyword=$1&search_in_description=1 [NC,L]
Doesn't seem to catch it, any thoughts? Thanks!
[Updated on: Sat, 09 December 2006 00:54]
|
|
|
| Re: Someone check my rewrite syntax? Thanks! [message #677 is a reply to message #676 ] |
Sat, 09 December 2006 01:20   |
casca9 Messages: 2 Registered: December 2006 |
|
|
|
|
Made a minor revision to it, not that it did any good. Anyone have a clue? Thx!
|
|
|
| Re: Someone check my rewrite syntax? Thanks! [message #678 is a reply to message #676 ] |
Thu, 14 December 2006 12:32  |
andreas Messages: 239 Registered: January 2005 Location: Denmark |
Site Admin
|
|
|
Where have you placed your .htaccess file?
I assume you have put in the cgi-bin/cfcart dir.
RewriteEngine on
RewriteRule cart.cgi\?partno=([0-9]+) http://www.cascadefire.com/cfeproducts/advanced_search_result.html?keyword=$1&search_in_description=1 [R,NC,L]
The above code will perform a external redirect (notice the R flag), which means you will see the new url in the address bar of the browser.
|
|
|