Advertisement
michaelyuen

Untitled

Dec 17th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.59 KB | None | 0 0
  1. httpd.conf
  2. ====================
  3. #make sure mod_rewrite is enabled
  4.  
  5. LoadModule rewrite_module modules/mod_rewrite.so
  6.  
  7.  
  8. .htaccess
  9. ====================
  10.  
  11. Options -MultiViews
  12. RewriteEngine On
  13.  
  14. RewriteBase /
  15.  
  16. # test.php pypass url rewrite. Remove that if not needed
  17. RewriteCond %{REQUEST_URI} !^test.php$
  18. RewriteCond %{REQUEST_FILENAME} !-d
  19. RewriteCond %{REQUEST_FILENAME} !-f
  20. RewriteCond %{REQUEST_URI}  !(\.png|\.jpg|\.gif|\.jpeg|\.bmp\.css\.js)$
  21.  
  22. RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
  23.  
  24. =====================
  25. index.php
  26. <?php
  27. if (isset($_GET['url'])) {
  28. echo $_GET['url']
  29. }
  30. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement