Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Modify one par of a URL and redirect

javascript URL parse

2:40 am on Nov 7, 2006 (gmt 0)

New User

10+ Year Member

joined:Apr 12, 2006
votes: 0

Hi guys,

I'm a rooking to Javascript and am stuck on this problem. People come to my site as
[mysite.com?submittosearch=yes?state=CA?city=Sacramento?...] ...

And so forth. But we have shut down mysite. I dont want to redirect without the query string: is it possible to direct that person to:

[mysite2.com?submittosearch=yes?state=CA?city=Sacramento?...] ...

I.E., keep the search string but change the domain? I cannot do this on the server side; I.E., it has to be done with javascript or something on the client side. Can anyone help?

Thank you!

8:41 pm on Nov 7, 2006 (gmt 0)

Senior Member

joined:Nov 12, 2005
votes: 0

related thread: [webmasterworld.com...]

Then once you have the url query you just have to change the location:

document.location.href = "new_link";

Good luck!


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members