• 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

Symfony/Form add attribute based on the data

PHP - Store information with NO database

Unsure why I am getting: Number of variables doesn't match number of parameters in prepared statement

Getting values for an enum?

Shopify password update using Shopify API

"Mixed content blocked" when running an HTTP AJAX operation in an HTTPS page

Merge key and value of array index [duplicate]

Laravel print last executed SQL query with Query log

Change the alert text on add to cart action without selected variation in Woocommerce

Laravel Command Schedule Not Working Properly

Laravel 8: Array to string conversion while calling route:list

Woocommerce Checkout - Add conditional field required if one field is filled

PHP Slim Framework request using withAttribute error

Limit login attempts in Laravel 5.7

Undefined Array Key error when uploading image on php

About Contact Privacy policy Terms and conditions