• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

PHP header location absolute URL

php


PHP Snippet 1:

header("location:http://www.example.com/path/to/myfile.php");
exit;

PHP Snippet 2:

$url = $_SERVER["HTTP_HOST"]."/path/to/myfile.php";
header("location:".$url);
exit;

Related Snippets

PHP | "The requested PHP extension bcmath is missing from your system."

Woocommerce redirect after add-to-cart error

target [LaravelFortifyContractsRegisterViewResponse] is not instantiable

Get Header Authorization value of a login api (sent with username and password in json body) using php curl

Where do I need to place a hook for phpunit?

Combining a describing and one array with data

Sort multidimensional array by column value within a column

Is there a way to use Foundry Model for Authentification inside Functional Tests?

Unsure why I am getting: Number of variables doesn't match number of parameters in prepared statement

Convert string to lowercase AND then convert it to its original form in PHP, is it possible?

Implode columnar values between two arrays into a flat array of concatenated strings

Reload parent page after submit in iframe

How to get page number on dompdf PDF when using "view"

Laravel Nova, route not found

How to get AJAX to post on second page?

About Contact Privacy policy Terms and conditions