Advertisement
joobidev

PHP for short URL

Sep 7th, 2015
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. <?php
  2. header( 'HTTP/1.1 301 Moved Permanently' );
  3. $url = 'http://my-main-domain.com/r.php?l='.trim($_SERVER['REQUEST_URI'],'/');
  4. header('Location: ' . $url );
  5. exit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement