• 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

Log a user out of a website when they put their computer to sleep

How to disable only_full_group_by option in Laravel

How do I call a php file with axios?

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

insert multiple rows in a saveall in cakephp

Natural ORDER in Laravel Eloquent ORM

Fatal error: Trait 'LaminasDbAdapterLaminasDbAdapterAdapterInterface' not found in /var/www/vendor/laminas/laminas-db/src/Adapter/Adapter.php

Implode columnar values between two arrays into a flat array of concatenated strings

Having issue with matching rows in the database using PDO

Hide specific products from unlogged users based in product category in WooCommerce

Can't remotely connect to MySQL error (13) with PHP script, connecting through CLI works

Composer Script echo

Manage independently the decimal number of the price of each product [duplicate]

Popup Window and PHP form

Get WooCommerce product variation attribute terms in admin products general box

About Contact Privacy policy Terms and conditions