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 8044245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:10:03+00:00 2026-06-05T05:10:03+00:00

I am getting 2 address in the browser window so I am getting an

  • 0

I am getting 2 address in the browser window so I am getting an error. This is on GoDaddy. I’m thinking maybe a change in the php might fix it because it seems to be bringing up the domain the redirect is coming from.

Example:
my site.com – trying to redirect to an external site after the submit button in the form is submitted.

It redirects me to:
http://www.mysite/ http://external_site
instead of just: external_site.com

Any help would be great as I am totally lost on this…

The redirect is in a hidden field in a form. It is using GoDaddy’s php which is below:

<?php
$request_method = $_SERVER["REQUEST_METHOD"];
if($request_method == "GET"){
  $query_vars = $_GET;
} elseif ($request_method == "POST"){
  $query_vars = $_POST;
}
reset($query_vars);
$t = date("U");

$file = $_SERVER['DOCUMENT_ROOT'] . "/../data/gdform_" . $t;
$fp = fopen($file,"w");
while (list ($key, $val) = each ($query_vars)) {
 fputs($fp,"<GDFORM_VARIABLE NAME=$key START>\n");
 fputs($fp,"$val\n");
 fputs($fp,"<GDFORM_VARIABLE NAME=$key END>\n");
 if ($key == "redirect") { $landing_page = $val;}
}
fclose($fp);
if ($landing_page != ""){
header("Location: http://".$_SERVER["HTTP_HOST"]."/$landing_page");
} else {
header("Location: http://".$_SERVER["HTTP_HOST"]."/");
}


?>
  • 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-05T05:10:05+00:00Added an answer on June 5, 2026 at 5:10 am

    Remove $_SERVER["HTTP_HOST"] in the first header …

    <?php
        /* above your code */ 
        if ($landing_page != ""){
          header("Location: $landing_page");  // If the http:// is missing don't forget to add it
        } else {
          header("Location: http://".$_SERVER["HTTP_HOST"]."/");
        }
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What is the better way of getting the IP address in PHP: getenv('REMOTE_ADDR'); or,
Getting this error when I follow the simple code example from jsoncpp, that basically
In my Android application for reading RSS links, I am getting this error: java.net.UnknownHostException:
The Chrome browser error I am getting reads error on line 1 at column
I'm getting a JavaScript error whenever you click the title link; in essence this
I'm getting this HTTP Error 404.0 - Not Found The resource you are looking
Is the only way of getting the address of an address in C (opposite
I need to getting the client ip address using javascript.Actually,our connection provider ip is
I'm having a problem getting emails to bounce to a specific email address, different
I'm trying to get the FROM email address in Mule ESB. I'm getting the

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.