• 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

get folder directory from input type file - PHP

carbon generated datetime not stored correctly into the database

What is my SQL missing?

How to insert data from multiple select dropdown values into database?

PHP - Store information with NO database

Modify microseconds of a PHP DateTime object

Using if(isset($_POST['submit'])) to not display echo when script is open is not working

Cant seem to get the Pagination to work on my WooCommerce REST API application?

How to extract price from given url using Xpath?

Python - Include another Python script

loop through an anchor id

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

Symfony there are no commands defined in the "make" namespace

Laravel Unknown Column 'updated_at'

Handle error for duplicate entries - PHP/MySQL

About Contact Privacy policy Terms and conditions