• 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

str_replace or preg_replace random number from string

Laravel dosen't connect with Oracle

Required field only if another field has a value, must be empty otherwise

Add a text next to stock quantity if it is less than 10 in Woocommerce single product

Redis Command To Sort Keys

Laravel websockets AWS EC2 - Connection failed

PHP, how to convert Int value to Week days

Codeigniter, Severity: error --> Exception: Too few arguments to function, admin dashboard shows HTTP error 500

How to display table header in every page using FPDF library?

Doctrine ORM: Excluding Records Based on Values of Nested Relationships

Symfony run hint kernel.secret parameter not found

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

How to add class name to an existing tag in php

Display Brand Name Above Product Title in Woocommerce Cart, Checkout Page, Orders and Email Notification

mysql slow on updates for a well optimized query

About Contact Privacy policy Terms and conditions