• 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

Call to a member function givePermissionTo() on null

Cannot connect to own websocket server when on secured domain

Laravel post contact form giving me error 419

PHP7 CLI attempts to load xdebug twice - "Cannot load Xdebug - it was already loaded"

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

display WooCommerce “Add to cart” button with short-code [add_to_cart ] dynamically

I need to link Google Sheet with my Laravel

PHP array sort and remove duplicates by two field values

How to render html from a @foreach loop in a textarea

PHP | "The requested PHP extension bcmath is missing from your system."

Laravel Delete and Update

PHP drop down list using array's and foreach (else and for) code

Center point of multiple gps coordinates with php

PHP rotate matrix counter-clockwise

laravel 5.6 bulk inserting json data

About Contact Privacy policy Terms and conditions