Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8885375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:17:47+00:00 2026-06-14T21:17:47+00:00

I got a URL like this: http://google.de/test.php?a=b&c=d&e=f I know got to modify just one

  • 0

I got a URL like this:

http://google.de/test.php?a=b&c=d&e=f

I know got to modify just one of the GET params like this: (c is “h” instead of “d”)

http://google.de/test.php?a=b&c=h&e=f

and redirect to the new url. All other GET params should stay the same.

How am I going to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T21:17:49+00:00Added an answer on June 14, 2026 at 9:17 pm

    I agree its best to use a library for this purpose as mentioned in other answers.

    However, here is a string replacement solution based on regular expressions if you need a simpler quick fix.

    var url = "http://my.com/page?x=y&z=1&w=34";
    
    var regEx = /([?&]z)=([^#&]*)/g;
    var newurl = url.replace(regEx, '$1=newValue');
    

    Here I’m replacing the query string key ‘z’ with ‘newVlaue’

    Have a look at this fiddle: http://jsfiddle.net/BuddhiP/PkNsx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have got a url like this - http://www.facebook.com/profile.php?id=1820816888 Now i want to get
With this url http://www.google.com/ig/calculator?hl=fr&q=150euro=?dirhams , we can have a currency convert. This is the
I've got legacy URLs like: mysite.com/index2.php?option=com_mtree&task=print&link_id=383&Itemid=168 and I'd like to redirect any URL that
I got this url /search/renttype-all.place-all.type-all.bedrooms-all.0.0/ I want to get the text after the second
I'm trying to parse the following URI : http://translate.google.com/#zh-CN|en|你 but got this error message
well i got this code: NSLog(@button pressed); NSString* myurl=@http://chart.apis.google.com/chart?chf=bg,s,67676700&chs=300x225&cht=p&chd=s:Uf9a&chdl=30°|40°|50°|60°; NSString *theurl=[myurl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; NSMutableURLRequest *theRequest=[NSMutableURLRequest
I got some URL's heading to certain mp3's like: (1) localhost://blablabla/song1.mp3 (2) localhost://blablabla/songwithmorechars.mp3 and
I've got two Urls. A server and a relative url that I would like
Ive got a url: http://dev.local/foodies/view?id=bluedaniel and ive got in my bootstrap: protected function _initRoute()
I've got following URL in symfony (specifics not important): /frontend_dev.php/something/25/apple ... and a routing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.