• 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 Print to Network Printer

Debugging Stripe Webhook Event

Laravel Sanctum CSRF not authenticating

WHM Enabling mod_rewrite

Can't exclude directories from .htaccess mobile redirect?

How to send image,audio or video through the WhatsApp API - PHP

Laravel 5 session not persisting after user is logged in

Nginx disallowing execution of PHP in uploads directory with Magento

How to send parameters in soap request in php in __soapcall() function

Store multiple fields in JSON column (Nova CMS)

Laravel whole batch is cancelled if one Job fails

"cannot list resources" error from WooCommerce REST API

Get keys from associative array [duplicate]

Shopify password update using Shopify API

WordPress Subquery returns more than 1 row on SELECT

About Contact Privacy policy Terms and conditions