• 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

Laravel Model save() & update() Not Saving

Extract string between first whitespace and last whitespace in php

Laravel Pagination links() not working

MOODLE: What does it mean to aggregate h5p assets?

How can i update or reset my password without entering email field in laravel-8?

Object of class stdClass could not be converted to string error

Error Class "LaravelFortifyFeatures" not found

How can I create a Download Page with post php method?

Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, null given in

Add Class in html Dynamically in PHP

Yii2 redirecting to previous page after login

Transpose and flatten multiple rows of array data [duplicate]

How to add automatically collapse/expand in content wordpress (single.php)?

Not able to access model in the controller mautic

How to pass data to all views in Laravel 5?

About Contact Privacy policy Terms and conditions