• 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

Vimeo API: how to save a vimeo into a subfolder?

phpmyadmin : Depends: php-twig (>= 2.9) but 2.6.2-2 is to be installed. WHAT?

using random function but it's displaying duplicates

Select option from dropdown menu with PHP and mySql

PHP array, move keys and values to new array, but mix it up

IlluminateDatabaseQueryException could not find driver [duplicate]

GA4 custom event from server side, can someone tell me how i can do the following code in php?

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

Add Class in html Dynamically in PHP

How can I format this number correctly using PHP?

Add customer email and phone in "Order" column to admin orders list on Woocommerce

Autoloading classes in PHPUnit using Composer and autoload.php

Show only featured products in Woocommerce shop page

How to solve cURL error 60: SSL certificate in Laravel 5 while Facebook authentication

The "client_reference_id" argument is not passed

About Contact Privacy policy Terms and conditions