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

  • SEARCH
  • Home
  • 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 1838536
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T06:29:26+00:00 2026-05-17T06:29:26+00:00

Say if I put www.abc.com in the browser, the browser automatically gets redirected to

  • 0

Say if I put http://www.abc.com in the browser, the browser automatically gets redirected to http://www.xyz.com. I need to get that redirect url from server side. That is, if http://www.abc.com returns a redirect url http://www.xyz.com, how can I request this redirect URL (www.xyz.com) from the original URL (www.abc.com)?

  • 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-05-17T06:29:27+00:00Added an answer on May 17, 2026 at 6:29 am

    Here’s a snippet from a web crawler that shows how to handle redirects:

      HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);
      webRequest.AllowAutoRedirect = false;  // IMPORTANT
      webRequest.UserAgent = ...;
      webRequest.Timeout = 10000;           // timeout 10s
    
      // Get the response ...
      using (webResponse = (HttpWebResponse)webRequest.GetResponse())
      {   
         // Now look to see if it's a redirect
         if ((int)webResponse.StatusCode >= 300 && (int)webResponse.StatusCode <= 399)
         {
           string uriString = webResponse.Headers["Location"];
           Console.WriteLine("Redirect to " + uriString ?? "NULL");
           ...
         }
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I somehow found this webpage and was absolutely stunned by the navigation bar. www.webdesignerwall.com
First of all, I want to say that I know there are a bunch
When I try to run my script I at first I put the shebang
I am looking for expert advice on how to best serve multiple sites with
I have just started a feasibility study on Django for my company and I
I'm not a very experienced programmer, and am using CodeIgniter for second time. Suppose
I'm sure MongoDB doesn't officially support joins. What does this mean? Does this mean
I have a blog in blogspot and I would like to add in my
I'm using the wamp package(Apache server) in my windows xp. After i followed the
I am trying to download a .csv file into an array and then parse

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.