Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 0.57 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Prevent Exposing Actual URL
  2. <a href="myserver.com/path/to/actual/phpFile/downloadPDF.pdf?arg1=blah&arg2">
  3.        
  4. Options +FollowSymLinks
  5. RewriteEngine on
  6. RewriteRule ^(.*)yournewaddress$  /path/to/actual/phpFile/downloadPDF.pdf?arg1=blah&arg2
  7.        
  8. <a href="myserver.com/yournewaddress">
  9.        
  10. # in server-config
  11. RewriteRule ^/download/pdf/(.+) /path/to/actual/phpFile/downloadPDF.php?args=$1 [L,QSA]
  12.        
  13. <a href="/download/pdf/blah">
  14.        
  15. /download/pdf/foo/bar
  16.        
  17. $args = isset($_GET['args']) ? explode('/', $_GET['args']) : array();
  18.        
  19. <?php
  20. include "path/to/actual/phpFile.php";
  21. ?>