Forum Moderators: phranque
Need some help, I haven't found addressed in the Forum.
I have a URL:
[myserverIP:8080...]
and need to redirect to:
[myserverIP:8090...]
the "category" value is obtained from the original URL, that is from .../int-newsml?... and it could change to other values. E.g. world-newsml, sport-newsml, etc...
So I did this by steps, experimenting and got to fetch the query parameter in the orignal URL and add it to the new URL, (this is in an httpd.conf file):
RewriteCond %{QUERY_STRING} ^itemid=(.*)
RewriteRule ^/client/dwnl/(.*)$ [myserverIP:8090...] [R=301,L]
THE ABOVE WORKS FINE, APPENDS THE ORIGINAL QUERY STRING. BUT WHEN I TRY TO ADD THE OTHER PARAMETER, THE CATEGORY VALUE, IT DOESN'T ADD THE itemid PARAMETER ANYMORE.
RewriteCond %{QUERY_STRING} ^itemid=(.*)
RewriteRule ^/client/dwnl/(.*)-newsml$ [myserverIP:8090...] [R=301,L]
I'VE TRIED ADDING A "&" BUT IT DOESN'T WORK
THANKS FOR YOUR HELP