Advertisement
Guest User

Nginx rewrite for Wmsn Doorway Generator

a guest
Feb 25th, 2018
1,214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.22 KB | None | 0 0
  1. location = /robots.txt {
  2.   rewrite ^(.*)$ /robots.php;
  3. }
  4.  
  5. location = /contact.html {
  6.   rewrite ^(.*)$ /contact.php;
  7. }
  8.  
  9. location = /rss.xml {
  10.   rewrite ^(.*)$ /rss.php;
  11. }
  12.  
  13. location = /sitemap.xml {
  14.   rewrite ^(.*)$ /sitemap.php;
  15. }
  16.  
  17. location = /BingSiteAuth.xml {
  18.   rewrite ^(.*)$ /BingSiteAuth.php;
  19. }
  20.  
  21. location / {
  22.   index  default.htm index.html index.htm index.php;
  23.   rewrite ^/([0-9a-z-]+)/$ /index.php?category=$1;
  24.   rewrite ^/([0-9a-z-]+)/([0-9]+).html$ /index.php?category=$1&url=$2;
  25.   rewrite ^/([0-9a-z-]+)/index.html$ /index.php?category=$1;
  26.   rewrite ^/([0-9a-z-]+)/([0-9a-z-]+)/$ /page.php?category=$1&url=$2;
  27.   rewrite ^/([0-9a-z-]+)/([0-9a-z-]+)/video/$ /video.php?category=$1&url=$2;
  28.   rewrite ^/([0-9a-z-]+)/([0-9a-z-]+)/gallery/$ /gallery.php?category=$1&url=$2;
  29.   rewrite ^/([0-9a-z-]+)/([0-9a-z-]+)/images/$ /images.php?category=$1&url=$2;
  30.   rewrite ^/([0-9a-z-]+)/([0-9a-z-]+)/vk/$ /vk.php?category=$1&url=$2;
  31. }
  32.  
  33. location /google {
  34.   rewrite ^/google(.*).html$ /google.php?id=$1;
  35. }
  36.  
  37. location /yandex_ {
  38.   rewrite ^/yandex_(.*).html$ /yandex.php?id=$1;
  39. }
  40.  
  41. location /wmail_ {
  42.   rewrite ^/wmail_(.*).html$ /wmail.php?id=$1;
  43. }
  44.  
  45. location = /news.html {
  46.   rewrite ^(.*)$ /rssparser.php;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement