• 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

Artisan, creating tables in database

Create tags in laravel post publishing

php file upload scanning using clamav, permissions on /tmp/

Redirect to previous page with php

Undefined variable in Laravel 8 project (php 7.4)

Symfony run hint kernel.secret parameter not found

Laravel websockets AWS EC2 - Connection failed

Return multiple values from a function using mysqli_fetch_assoc [closed]

Unable to create lockable file - Laravel 8 & PHP 8

Woocommerce Edit Message "An account is already registered with your email address. Please log in."

Insert database rows from columns of data from associative array of indexed arrays

Saving Data from form to database using AngularJS and php

How do I upload a laravel project on cPanel shared hosting?

How to use a PHP MVC Controller, one thats invoked by calling a URL, to call and execute more than one function? [duplicate]

Message: Set sys_temp_dir in your php.ini after installed composer

About Contact Privacy policy Terms and conditions