• 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

Handling expired token in Laravel

Problem with fetching data from database in Laravel

if statement inside concatenation

Symfony - "framework.test" config is not set to true

Can I use a WooCommerce function without any WooCommerce page?

Laravel php artisan serve to mimic HTTPS

How to create custom authentication in laravel 8?

Symfony autowiring issues since docker update

Multiple order by in WooCommerce

Composer Curl error 60: SSL certificate problem: unable to get local issuer certificate

How to show selected value using javascript in laravel

Changing font color in javascript

Transfer data between JavaScript and PHP through JSON

How to validate tin and cst using PHP?

Android Volley getParams() method not getting called for JsonObjectRequest

About Contact Privacy policy Terms and conditions