• 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 custom text under order details on WooCommerce My account view order pages

Handling expired token in Laravel

Exact alternate to mcrypt_encrypt in PHP 7.2

500 (Internal Server Error) with Laravel & Docker [duplicate]

Sort multidimensional array by column value within a column

I want to display a sweetalert after the inserting of data in my database

Ajax GET request fails in laravel 8

Star rating with half star support

is there any way to validate a field that sometime is File(image) && sometime is String(Src of same image)

Shopify password update using Shopify API

run a query using EXECUTE BLOCK to prepair a column for an unique-Index

How to use $this->session->set_userdata in codeigniter

Dropdown with current value from Mysql

PHP file_get_contents function

Laravel insert dynamic input values with radio button

About Contact Privacy policy Terms and conditions