This assumes that you've already got other mod_rewrite rules in place, and therefore that you have already enabled mod_rewrite and the rewriting engine.
See the resources cited in our Apache Forum Library for more information (link at the top of this page).
Jim
Doublehelix
8:17 am on Jul 23, 2010 (gmt 0)
Hi jdMorgan
That's is great and works perfectly
thank you very much for that , my head was battered trying to get it working
Doublehelix
9:47 am on Jul 23, 2010 (gmt 0)
Hi I have come across another issue as the products have more information in the URL's
for example the url is domain.net/catalog/product_info.php?cPath=67_23_437_439&products_id=1215
this needs to forward to newdomain.com/index.php?app=gbu0&ns=prodshow&ref=1215
do i need more queries for the redirect to work?
Cheers
jdMorgan
5:54 pm on Jul 23, 2010 (gmt 0)
No. If the query string always starts with "cPath=" but may or may not have additional parameters appended, just change the query string pattern:
Please see the regular expressions documentation cited in our forum charter. While we're happy to provide examples here, it's up to you to modify those examples to suit your exact needs... :)
There are solutions for many, many variations of URL- and query-string formats. But it would be impossible to post more than a few of the thousaands of potential solutions. Therefore, asking about *exactly* what you need is critical, because the code must be exact.
Jim
Doublehelix
9:40 am on Jul 26, 2010 (gmt 0)
Hi Jim
That has been a great help, this works like a charm.