• 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

PHP DOTENV unable to load env vars

Get lat/lon from google maps url ftid (hex)

Apply session id from request header

Get number of working days between two dates in PHP [duplicate]

woocommerce change position of price

What will the best solution for this multiple optional filter?

Can I use a WooCommerce function without any WooCommerce page?

Search for array row with specific column value and return another value from qualifying row

xdebug 3 not working in ubuntu 20.04 with docker

How to set time with DateTime modify?

How do I get friend list from Friends table with counts of friends of my friends

How can I get a div content in php

Unit (real unit test) of test laravel relationship

PhP how to calculate moments with variables rows

Laravel Excel::store file empty after stored

About Contact Privacy policy Terms and conditions