• 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

Display specific shipping method if woocommerce product has specific acf field value

WAMP Virtual Host not working

oauth-private.key does not exist or is not readable

Laravel - How to properly generate unique slugs from article titles?

Get keys from associative array [duplicate]

Create tags in laravel post publishing

PHP error: "The zip extension and unzip command are both missing, skipping."

XML to CSV with PHP converter [problem with images grabing]

Declaration of OMDb::query(string $statement) must be compatible with PDO::query

Login if user is active using Laravel Breeze

Valet, Xdebug after reboot Big Sur not working

How to create laravel storage symbolic link for production or sub domain system?

Yoast SEO (WordPress Plugin) - Get plugin generated data manually

carbon generated datetime not stored correctly into the database

How to override htaccees file for cache control header

About Contact Privacy policy Terms and conditions