• 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

How to MODIFY a Google Docs document via API using search-and-replace?

Correctly determine if date string is a valid date in that format

How To Access A Column In M-M Relationship Table In Laravel

how to create html table in php

Facebook PHP SDK - will not logout properly

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

virtctl works when executed via command line but not from php exec()

Reload parent page after submit in iframe

XDebug not working in VScode for php debugging

Two buttons one form

Laravel PHP: multiple project run at the same time [closed]

Loading data from MySQL and populating dropdown select with jQuery Mobile, PHP

MySQL order by field in Eloquent

Extract string between first whitespace and last whitespace in php

add_action() function in wordpress not working [duplicate]

About Contact Privacy policy Terms and conditions