• 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

Wordpress 'post_type_link' hides permalink

Magento Installation SQLSTATE[HY000] [2002] No such file or directory error

Find out the name of the last script that included the current one

Fatal error: Array callback has to contain indices 0 and 1

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

PHP random string generator

how do i retrieve and display the alt text of an image in wordpress?

Adding the custom page with add_menu_page function on Wordpress

Currently Using CodeIgniter Framework i have an Error

Unsure why I am getting: Number of variables doesn't match number of parameters in prepared statement

How to override htaccees file for cache control header

PHP 8 - libxml_disable_entity_loader() has been deprecated. How do I replace the functionality it provides?

*** ERROR *** The PHP configuration loaded file is: c:/wamp64/bin/php/php8.1.0/php.ini - should be: c:/wamp64/bin/apache/apache2.4.53.1/bin/php.ini

Laravel views are showing from cache on one server but works fine on other server

possible options to create pdf file using html elements to generate invoice in php and codeigniter

About Contact Privacy policy Terms and conditions