• 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 code for generating decent-looking coupon codes (mix of letters and numbers)

php code to send checkbox form results to email

CSV to PHP class properties

loop through an anchor id

Declaration of OMDb::query(string $statement) must be compatible with PDO::query

Combine array with same value and add other [duplicate]

Multiple order by in WooCommerce

Utf8 encoding issue with Laravel

What is PHP's equivalent of JavaScript's "array.every()"?

PHPSpreadsheet - How Do I Use Auto Migration Tool

Transpose and flatten two-dimensional indexed array where rows may not be of equal length

How do I call Validator from a namespace with an already existing Validator class

wordpress : How to specify the cause "This site can’t be reached"

(Laravel) How to delete multiple models including optional relationships?

Statement that checks whether a URL contains a particular path?

About Contact Privacy policy Terms and conditions