• 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 get Laravel's CSRF Token from Another Website?

WordPress Security Standards want me to escape my html, but how to do it correctly?

How to connect to MSSQL Server with PHP from Ubuntu 18.04?

Having issue with matching rows in the database using PDO

PHP array_filter with arguments

Sort multidimensional array by column value within a column

Add restriction to WooCommerce coupons by allowed user ID

Laravel lang slug in url

"Notice: Undefined variable", "Notice: Undefined index", "Warning: Undefined array key", and "Notice: Undefined offset" using PHP

Symfony/Form add attribute based on the data

str_word_count() function doesn't display Arabic language properly

generating a random code in php?

Insert multidimensional array to codeigniter cart

PHP: PDO + CSV export not downloading (headers issue?)

how to hide previous markers when new markers added in google map javascript api

About Contact Privacy policy Terms and conditions