[mydomain.com...]
...grab that part number on the end, and redirect them to:
[mydomain.com...]
...plugging in that part number for the keyword. To do so, I'm trying the following lines in my .htaccess file:
RewriteEngine on
RewriteRule cgi-bin/cfcart/cart.cgi\?partno=([0-9]+)$ /cfeproducts/advanced_search_result.html\?keyword=$1&search_in_description=1 [NC,L]
It's not working, any thoughts? Thanks!
Break the request at the "?" and match the URL-part in RewriteRule, and the query part in the RewriteCond. The "?" delimiter itself is part of neither.
For more information, see the documents cited in the Apache forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].
Jim
http://www.example.com/Keyword-Rich-Title
and your mod_rewrite could be
RewriteEngine On
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule ^(.*)$ cgi-bin/cfcart/cart.cgi [L]
So if the request is not a file, and not a directory, point it to the script. In your script, you have some method of associating the title with the product id. So
/Keyword-Rich-Title
would set
$qs{'partno'} = 50187;
and call up the appropriate page.