• 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

Correct way to use LIKE '%{$var}%' with prepared statements?

Is there a way to use Foundry Model for Authentification inside Functional Tests?

Unable to guess the mime type as no guessers are available Laravel 5.2

OAuth2 Token PHP

How do I do HTTP basic authentication using Guzzle?

Normalize DateInterval in PHP

How to Display Data in Yajra Datatables Laravel 7?

PHP mail function is sending blank message body

Why isn't my PHP exception working?

How to create a individual template for page or post in custom plugin?

Php - Sum up the numbers in an array one by one

Additional price based on cart item count in WooCommerce

Laravel Unknown Column 'updated_at'

How to programmatically find public properties of a class from inside one of it's methods

how to remove white space in select 2

About Contact Privacy policy Terms and conditions