• 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

"Unable to load dynamic library 'pdo_sqlsrv.so' "Cenos7 PHP7.2.10

shell errors running php exec

Prestashop cUrl Login

PhpSpreadSheet: How to save Workbook sheets in individual CSV files

Auto increment id JSON

disable two buttons after clicking another button

Center point of multiple gps coordinates with php

Whats the point of running Laravel with the command 'php artisan serve'?

Laravel display validation error

Cross-Origin Resource Sharing (CORS) witth Laravel and Vuejs

Can't find vendor/autoload.php for Ratchet

PHP AWS Cognito 'Error executing "SignUp" : ResourceNotFoundException : User pool client XXXX does not exist

How to debug in WooCommerce 3+

Laravel Livewire: jQuery not working in child component loaded via @if statement

Yii2 select2 database exception number of bound variables does not match number of tokens

About Contact Privacy policy Terms and conditions