• 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

add " ? " in url via htaccess RewriteRule

PHP date() with timezone?

How to debug in WooCommerce 3+

Ajax GET request fails in laravel 8

PHP returning an error message and false

PHP array stringify

How to loop sql table data inside a html table

Laravel passport auth token not working after moving to different server

Add Class in html Dynamically in PHP

add uri parameter to Route name in laravel

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

PHP: How to quickly split a key=value file into associative array

how to check version of codeigniter framework?

How to access a var with "-" in PHP [duplicate]

Split array into 4-element chunks then implode into strings

About Contact Privacy policy Terms and conditions