• 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

dockerizing Laravel + vue

How to skip cart page on woocomerce for certain products only?

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

Laravel Gates using model and returns "Using $this when not in object context" Line 28 of AzureUser model

Handling expired token in Laravel

codeigniter 4 running error first time with xampp

Destroy session upon refresh

How to insert Google Adsense Code in PHP script?

Distribute array row data to make multiple new rows

Put content of wordpress page inside div

How to set time with DateTime modify?

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

Transfer data between JavaScript and PHP through JSON

How to get the survey List from surveygizmo API in the Postman?(Trial Version)

PHP-Sort array based on another array?

About Contact Privacy policy Terms and conditions