• 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

merge all files in directory to one text file

How to downgrade or install a specific version of Composer?

how to fix Service provider class not found when using repository?

Laravel Mix Uncaught ReferenceError: $ is not defined

PHP code for generating decent-looking coupon codes (mix of letters and numbers)

Whats the point of running Laravel with the command 'php artisan serve'?

how to create html table in php

Check if my GET request has Header: Token

Cant seem to get the Pagination to work on my WooCommerce REST API application?

LARAVEL: How to fetch id dynamically in a query builder?

How update php.ini on a Mac OS X Mojave?

Lexik JWT authentication problem "Invalid credentials"

how to prevent float variables displaying as scientific notation when printing [duplicate]

Using array_intersect on a multi-dimensional array

calling server using nusoap with complextype

About Contact Privacy policy Terms and conditions