Advertisement
Guest User

Untitled

a guest
Jun 27th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. Options +FollowSymLinks
  2.  
  3. RewriteEngine On
  4. RewriteRule ^([^/]*).php$ index.php?page=$1 [L,QSA]
  5.  
  6. # Downloads
  7. rewrite ^/downloads/([0-9]+)/([^/]*)$ /./downloads.php?action=displaycat&catid=$1 last;
  8. rewrite ^/downloads$ /./downloads.php last;
  9.  
  10. #Knowledgebase
  11. rewrite ^/knowledgebase/([0-9]+)/[a-zA-Z0-9-]+.html$ /./knowledgebase.php?action=displayarticle&id=$1 last;
  12. rewrite ^/knowledgebase/([0-9]+)/([^/]*)$ /./knowledgebase.php?action=displaycat&catid=$1 last;
  13. rewrite ^/knowledgebase$ /./knowledgebase.php last;
  14.  
  15.  
  16. location / {
  17. try_files $uri $uri/ /index.php?$args;
  18. }
  19.  
  20. location /NaxsiRequestDenied {
  21. return 418;
  22. }
  23.  
  24. location ~ ^/pingphpfpm$ {
  25. include /etc/nginx/fastcgi_params;
  26. fastcgi_pass unix:/opt/remi/php56/root/var/run/user.sock;
  27. }
  28.  
  29. location ~* /.(?!well-known/) { deny all; access_log off; log_not_found off; }
  30. autoindex on;
  31.  
  32. location ~ .php$ {
  33. include /etc/nginx/conf.d/naxsi_learn.rules;
  34. include /etc/nginx/sites-enabled/mysite.com.nxapi.wl;
  35.  
  36. try_files $uri =404;
  37. fastcgi_pass unix:/opt/remi/php56/root/var/run/extranet.sock;
  38. fastcgi_index index.php;
  39. include /etc/nginx/fastcgi_params;
  40. }
  41.  
  42. include /etc/nginx/conf.d/cpanel_services.conf;
  43. # nginx configuration
  44. location / {
  45. rewrite ^/([^/]*).php$ /index.php?page=$1 break;
  46. }
  47.  
  48. <?php ob_start();
  49. include "inc/config.php";
  50. $page = $_GET["page"];
  51. if(!isset($page) || $page == "" ){
  52. header("Location:".SITE."index.php");
  53. exit();
  54. }
  55. $access = 1;
  56.  
  57. include "inc/template.php";
  58. ob_flush();
  59. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement