
Untitled
By: a guest on
May 7th, 2012 | syntax:
None | size: 0.57 KB | hits: 12 | expires: Never
Prevent Exposing Actual URL
<a href="myserver.com/path/to/actual/phpFile/downloadPDF.pdf?arg1=blah&arg2">
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.*)yournewaddress$ /path/to/actual/phpFile/downloadPDF.pdf?arg1=blah&arg2
<a href="myserver.com/yournewaddress">
# in server-config
RewriteRule ^/download/pdf/(.+) /path/to/actual/phpFile/downloadPDF.php?args=$1 [L,QSA]
<a href="/download/pdf/blah">
/download/pdf/foo/bar
$args = isset($_GET['args']) ? explode('/', $_GET['args']) : array();
<?php
include "path/to/actual/phpFile.php";
?>