• 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

How do I Post to .txt document before form submits

Getting values for an enum?

Use same method for inertia response and json response Laravel Jetstream

Laravel Pagination links() not working

Wordpress add responsive srcset header image to theme

Converting array to string and then back in PHP

getting error while enter Command => php artisan route:list

PHP: Calling MySQL Stored Procedure with Both INPUT AND OUTPUT Parameters (NOT "INOUT")

How to validate tin and cst using PHP?

PHP Print to Network Printer

How can I get data from PHP to Android TextView?

Laravel Factory not calling callback 'afterCreating'

Multiply each value in array using array_map function

How to disable only_full_group_by option in Laravel

Multiple order by in WooCommerce

About Contact Privacy policy Terms and conditions