Forum Moderators: phranque

Message Too Old, No Replies

Url Redirect with parameters

url redirect

         

dealsghost

11:32 am on Jan 13, 2011 (gmt 0)

10+ Year Member



I want to redirect
http://212.47.172.116/abc/efg/getdata.do?param1=param1&param2=param2&param3=param3 ...can be any


to my localhost

http://localhost/abc/efg/getdata.do?param1=param1&param2=param2&param3=param3 ...can be any



So is this rule correct
RewriteRule ^/abc/efg/getdata$ http://localhost%{REQUEST_URI} [RL]



Sorry if it is too naive

dealsghost

11:47 am on Jan 13, 2011 (gmt 0)

10+ Year Member



restarting and testing it on server is a costly affair because of some constraints that is why want to do it in minimum number of tries so asked here.

jdMorgan

5:53 pm on Jan 14, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Where do you intend to place this code -- in .htaccess, or in a server config file?

If the latter, do you intend to place inside or outside any <Directory> section?

Do you have other working mod_rewrite code in this location?

Other than the bad flag syntax (should be [R,L] for a 302 redirect), and assuming you've got the required directives to set up and enable mod_rewrite, your code should work in a server config file outside of any <Directory> container.

Jim