• 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

Ajax GET request fails in laravel 8

MongoDB Duplicate Documents even after adding unique key

Sync Records With Default Values in Pivot Tables, Call to undefined method syncWithPivotDefaults()

Laravel PackageManifest.php: Undefined index: name

How to use $this->session->set_userdata in codeigniter

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

How to make autocomplete work in foreach php loop? (vscode, intellisense)

What's the net::ERR_HTTP2_PROTOCOL_ERROR about?

Apply filter array/return terms

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource [duplicate]

How to test laravel controller method?

Pages are working fine on localhost but not running on the hosting server

Lexik JWT authentication problem "Invalid credentials"

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

How to get array values using foreach in laravel

About Contact Privacy policy Terms and conditions