• 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

ORA-12546: TNS:permission denied error connection to remote oracle server

Auto increment id JSON

Converting alphabet letter to alphabet position in PHP [duplicate]

How to test a php login connected to a mysql db through xampp?

Yii2: How to download backup files using spanjeta/yii2-backup?

TesseractOCR not working for Laravel

enable Apache http Authorization header

How to debug in WooCommerce 3+

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

Show date difference as "20" instead of "20 years ago"

Normalize DateInterval in PHP

Respond with status code 401 on authentication failure using Laravel and Passport?

Transpose multidimensional array and join values with commas

Edit XML in HTML form and submit to self

Could not decode a text frame as UTF-8.

About Contact Privacy policy Terms and conditions