Advertisement
Guest User

Untitled

a guest
Jan 29th, 2020
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.50 KB | None | 0 0
  1. # nginx configuration
  2.  
  3. location / {
  4. if (!-e $request_filename){
  5. rewrite ^/password-reset/([^\/]+)(\/|)$ /index.php?link1=welcome&link2=password_reset&user_id=$1;
  6. }
  7. rewrite ^/$ /index.php?link1=home;
  8. rewrite "^/forum/members/([a-zA-Z]{0,1})(/?|)$" /index.php?link1=forum-members-byname&char=$1;
  9. if (!-e $request_filename){
  10. rewrite ^/setting/([A-Za-z0-9_]+)/([A-Za-z0-9_-]+)$ /index.php?link1=setting&user=$1&page=$2;
  11. rewrite ^/setting/([A-Za-z0-9_-]+)$ /index.php?link1=setting&page=$1;
  12. rewrite ^/setting$ /index.php?link1=setting;
  13. }
  14. if (!-e $request_filename){
  15. rewrite ^/@([^\/]+)(\/|)$ /index.php?link1=timeline&u=$1;
  16. }
  17. if (!-e $request_filename){
  18. rewrite ^/([A-Za-z0-9_]+)/([^\/]+)(\/|)$ /index.php?link1=timeline&u=$1&type=$2;
  19. }
  20. if (!-e $request_filename){
  21. rewrite ^/([^\/]+)(\/|)$ /index.php?link1=timeline&u=$1;
  22. }
  23. }
  24.  
  25. location /admin {
  26. rewrite ^/admin-cp$ /admincp.php;
  27. rewrite ^/admin-cp/(.*)$ /admincp.php?page=$1;
  28. rewrite ^/admin/ads/edit/(\d+)(/?|)$ /index.php?link1=manage-ads&id=$1;
  29. }
  30.  
  31. location = /admincp {
  32. rewrite ^(.*)$ /admincp.php;
  33. }
  34.  
  35. location /admincp {
  36. rewrite ^/admincp/(.*)$ /admincp.php?page=$1;
  37. }
  38.  
  39. location /adminPages/ {
  40. return 301 /admin-panel/;
  41. }
  42.  
  43. location ~ ^/adminPages/(.*) {
  44. return 301 /admin-panel/$1;
  45. }
  46.  
  47. location /start {
  48. rewrite ^/start-up$ /index.php?link1=start-up;
  49. }
  50.  
  51. location /saved {
  52. rewrite ^/saved-posts/(.*)$ /index.php?link1=saved-posts;
  53. rewrite ^/saved-posts$ /index.php?link1=saved-posts;
  54. }
  55.  
  56. location /activated {
  57. rewrite ^/activated/(.*)$ /index.php?link1=activate&link2=$1;
  58. }
  59.  
  60. location = /search {
  61. rewrite ^(.*)$ /index.php?link1=search;
  62. }
  63.  
  64. location /ads {
  65. rewrite ^/ads-create$ /index.php?link1=ads-create;
  66. rewrite ^/advertise(/?|)$ /index.php?link1=advertise;
  67. rewrite ^/ads/create(/?|)$ /index.php?link1=create-ads;
  68. rewrite ^/ads/edit/(\d+)(/?|)$ /index.php?link1=edit-ads&id=$1;
  69. rewrite ^/ads/chart/(\d+)(/?|)$ /index.php?link1=chart-ads&id=$1;
  70. }
  71.  
  72. location /send_money {
  73. rewrite ^/send_money$ /index.php?link1=ads-create;
  74. }
  75.  
  76. location = /most_liked {
  77. rewrite ^(.*)$ /index.php?link1=most_liked;
  78. }
  79.  
  80. location /suggested {
  81. rewrite ^/suggested-pages(/?|)$ /index.php?link1=suggested-pages;
  82. rewrite ^/suggested-groups(/?|)$ /index.php?link1=suggested-groups;
  83. }
  84.  
  85. location = /poke {
  86. rewrite ^(.*)$ /index.php?link1=poke;
  87. }
  88.  
  89. location /search {
  90. rewrite ^/search/([^\/]+)(\/|)$ /index.php?link1=search&query=$1;
  91. }
  92.  
  93. location /app {
  94. rewrite ^/app/([^\/]+)(\/|)$ /index.php?link1=app&app_id=$1;
  95. }
  96.  
  97. location /messages {
  98. rewrite ^/messages/([^\/]+)(\/|)$ /index.php?link1=messages&user=$1;
  99. }
  100.  
  101. location /terms {
  102. rewrite ^/terms/([^\/]+)(\/|)$ /index.php?link1=terms&type=$1;
  103. }
  104.  
  105. location /video {
  106. rewrite ^/video-call/([^\/]+)(\/|)$ /index.php?link1=video-call&call_id=$1;
  107. rewrite ^/video-call-api/([^\/]+)(\/|)$ /index.php?link1=video-call-api&call_id=$1;
  108. }
  109.  
  110. location /post {
  111. rewrite ^/post/([^\/]+)(\/|)$ /index.php?link1=post&id=$1;
  112. }
  113.  
  114. location /game {
  115. rewrite ^/game/([^\/]+)(\/|)$ /index.php?link1=game&id=$1;
  116. }
  117.  
  118. location = /upgraded {
  119. rewrite ^(.*)$ /index.php?link1=upgraded;
  120. }
  121.  
  122. location = /get_news_feed {
  123. rewrite ^(.*)$ /index.php?link1=get_news_feed;
  124. }
  125.  
  126. location = /games {
  127. rewrite ^(.*)$ /index.php?link1=games;
  128. }
  129.  
  130. location /new {
  131. rewrite ^/new-game$ /index.php?link1=new-game;
  132. rewrite ^/new-product$ /index.php?link1=new-product;
  133. }
  134.  
  135. location /go {
  136. rewrite ^/go-pro$ /index.php?link1=go-pro;
  137. }
  138.  
  139. location = /oops {
  140. rewrite ^(.*)$ /index.php?link1=oops;
  141. }
  142.  
  143. location /user {
  144. rewrite ^/user-activation$ /index.php?link1=user-activation;
  145. }
  146.  
  147. location /hashtag {
  148. rewrite ^/hashtag/([^\/]+)(\/|)$ /index.php?link1=hashtag&hash=$1;
  149. }
  150.  
  151. location /follow {
  152. rewrite ^/follow-requests/(.*)$ /index.php?link1=follow-requests;
  153. }
  154.  
  155. location = /home {
  156. rewrite ^(.*)$ /index.php?link1=home;
  157. }
  158.  
  159. location = /404 {
  160. rewrite ^(.*)$ /index.php?link1=404;
  161. }
  162.  
  163. location /welcome {
  164. rewrite ^/welcome(.*)$ /index.php?link1=welcome;
  165. }
  166.  
  167. location = /register {
  168. rewrite ^(.*)$ /index.php?link1=register;
  169. }
  170.  
  171. location /confirm {
  172. rewrite ^/confirm-sms$ /index.php?link1=confirm-sms;
  173. rewrite ^/confirm-sms-password(/?|)$ /index.php?link1=confirm-sms-password break;
  174. }
  175.  
  176. location /forgot {
  177. rewrite ^/forgot-password$ /index.php?link1=forgot-password;
  178. }
  179.  
  180. location = /activate {
  181. rewrite ^(.*)$ /index.php?link1=activate;
  182. }
  183.  
  184. location = /pages {
  185. rewrite ^(.*)$ /index.php?link1=pages;
  186. }
  187.  
  188. location = /groups {
  189. rewrite ^(.*)$ /index.php?link1=groups;
  190. }
  191.  
  192. location /create {
  193. rewrite ^/create-group$ /index.php?link1=create-group;
  194. rewrite ^/create-page$ /index.php?link1=create-page;
  195. rewrite ^/create-album$ /index.php?link1=create-album;
  196. rewrite ^/create-album/([A-Za-z0-9_-]+)$ /index.php?link1=create-album&album=$1;
  197. rewrite ^/create-blog(/?|)$ /index.php?link1=create-blog;
  198. rewrite ^/create-app$ /index.php?link1=create-app;
  199. }
  200.  
  201. location = /logout {
  202. rewrite ^(.*)$ /index.php?link1=logout;
  203. }
  204.  
  205. location /contact {
  206. rewrite ^/contact-us$ /index.php?link1=contact-us;
  207. }
  208.  
  209. location = /messages {
  210. rewrite ^(.*)$ /index.php?link1=messages;
  211. }
  212.  
  213. location = /albums {
  214. rewrite ^(.*)$ /index.php?link1=albums;
  215. }
  216.  
  217. location /albums {
  218. rewrite ^/albums/([A-Za-z0-9_-]+)$ /index.php?link1=albums&user=$1;
  219. }
  220.  
  221. location /album {
  222. rewrite ^/album/([A-Za-z0-9_-]+)$ /index.php?link1=album&id=$1;
  223. }
  224.  
  225. location /page {
  226. rewrite ^/page-setting/([^\/]+)(\/|)$ /index.php?link1=page-setting&page=$1;
  227. rewrite ^/page-setting/([A-Za-z0-9_]+)/([A-Za-z0-9_-]+)$ /index.php?link1=page-setting&page=$1&link3=$2;
  228. }
  229.  
  230. location /group {
  231. rewrite ^/group-setting/([^\/]+)(\/|)$ /index.php?link1=group-setting&group=$1;
  232. rewrite ^/group-setting/([A-Za-z0-9_]+)/([A-Za-z0-9_-]+)$ /index.php?link1=group-setting&group=$1&link3=$2;
  233. }
  234.  
  235. location /edit {
  236. rewrite ^/edit-product/([A-Za-z0-9_]+)$ /index.php?link1=edit-product&id=$1;
  237. rewrite ^/edit-blog/(\d+)(/?|)$ /index.php?link1=edit-blog&id=$1;
  238. }
  239.  
  240. location = /products {
  241. rewrite ^(.*)$ /index.php?link1=products;
  242. }
  243.  
  244. location /products {
  245. rewrite ^/products/([A-Za-z0-9_-]+)$ /index.php?link1=products&c_id=$1;
  246. }
  247.  
  248. location /my {
  249. rewrite ^/my-products$ /index.php?link1=my-products;
  250. rewrite ^/my-blogs(/?|)$ /index.php?link1=my-blogs;
  251. }
  252.  
  253. location /site {
  254. rewrite ^/site-pages/(.*)$ /index.php?link1=site-pages&page_name=$1;
  255. }
  256.  
  257. location = /blogs {
  258. rewrite ^(.*)$ /index.php?link1=blogs;
  259. }
  260.  
  261. location = /sharer {
  262. rewrite ^(.*)$ /index.php?link1=sharer;
  263. }
  264.  
  265. location /blog {
  266. rewrite ^/blog-category/(\d+)(/?|)$ /index.php?link1=blog-category&id=$1;
  267. }
  268.  
  269. location /read {
  270. rewrite ^/read-blog/(.*)$ /index.php?link1=read-blog&id=$1;
  271. }
  272.  
  273. location = /app_api {
  274. rewrite ^(.*)$ /index.php?link1=app_api;
  275. }
  276.  
  277. location /api {
  278. rewrite ^/api(/?|)$ /api-v2.php;
  279. rewrite ^/api/([^\/]+)(\/|)$ /api-v2.php?type=$1;
  280. }
  281.  
  282. location = /authorize {
  283. rewrite ^(.*)$ /index.php?link1=authorize;
  284. }
  285.  
  286. location /forum {
  287. rewrite ^/forum(/?|)$ /index.php?link1=forum;
  288. rewrite ^/forum/members(/?|)$ /index.php?link1=forum-members;
  289. rewrite ^/forum/search(/?|)$ /index.php?link1=forum-search;
  290. rewrite ^/forum/search-result/(/?|)$ /index.php?link1=forum-search-result;
  291. rewrite ^/forum/events(/?|)$ /index.php?link1=forum-events;
  292. rewrite ^/forum/help(/?|)$ /index.php?link1=forum-help;
  293. }
  294.  
  295. location /forums {
  296. rewrite ^/forums/(\d+)(/?|)$ /index.php?link1=forums&fid=$1;
  297. rewrite ^/forums/add/(\d+)(/?|)$ /index.php?link1=forumaddthred&fid=$1;
  298. rewrite ^/forums/thread/(\d+)(/?|)$ /index.php?link1=showthread&tid=$1;
  299. rewrite ^/forums/thread/reply/(\d+)(/?|)$ /index.php?link1=threadreply&tid=$1;
  300. rewrite ^/forums/thread/quote/(\d+)(/?|)$ /index.php?link1=threadquote&tid=$1;
  301. rewrite ^/forums/thread/edit/(\d+)(/?|)$ /index.php?link1=editreply&tid=$1;
  302. rewrite ^/forums/user/threads(/?|)$ /index.php?link1=mythreads;
  303. rewrite ^/forums/user/threads/edit/(\d+)(/?|)$ /index.php?link1=edithread&tid=$1;
  304. rewrite ^/forums/user/messages(/?|)$ /index.php?link1=mymessages;
  305. }
  306.  
  307. location /events {
  308. rewrite ^/events(/?|)$ /index.php?link1=events;
  309. rewrite ^/events/create-event(/?|)$ /index.php?link1=create-event;
  310. rewrite ^/events/edit/(\d+)/(/?|)$ /index.php?link1=edit-event&eid=$1;
  311. rewrite ^/events/my(/?|)$ /index.php?link1=my-events;
  312. rewrite ^/events/going(/?|)$ /index.php?link1=events-going;
  313. rewrite ^/events/invited(/?|)$ /index.php?link1=events-invited;
  314. rewrite ^/events/interested(/?|)$ /index.php?link1=events-interested;
  315. rewrite ^/events/past(/?|)$ /index.php?link1=events-past;
  316. rewrite ^/events/(\d+)(/?|)$ /index.php?link1=show-event&eid=$1;
  317. }
  318.  
  319. location /unusual {
  320. rewrite ^/unusual-login$ /index.php?link1=unusual-login;
  321. }
  322.  
  323. location /movies {
  324. rewrite ^/movies(/?|)$ /index.php?link1=movies;
  325. rewrite ^/movies/genre/([A-Za-z-]+)(/?|)$ /index.php?link1=movies-genre&genre=$1;
  326. rewrite ^/movies/country/([A-Za-z-]+)(/?|)$ /index.php?link1=movies-country&country=$1;
  327. rewrite ^/movies/watch/(\d+)(/?|)$ /index.php?link1=watch-film&film-id=$1;
  328. }
  329.  
  330. location /wallet {
  331. rewrite ^/wallet(/?|)$ /index.php?link1=wallet;
  332. }
  333.  
  334. location /status {
  335. rewrite ^/status/create(/?|)$ /index.php?link1=create-status;
  336. }
  337.  
  338. location /more {
  339. rewrite ^/more-status(/?|)$ /index.php?link1=more-status;
  340. }
  341.  
  342. location /friends {
  343. rewrite ^/friends-nearby(/?|)$ /index.php?link1=friends-nearby;
  344. }
  345.  
  346. location /_ {
  347. rewrite ^/_$ /requests.php;
  348. }
  349.  
  350. location /graph {
  351. rewrite ^/graph-success$ /index.php?link1=graph-success;
  352. }
  353.  
  354. location = /developers {
  355. rewrite ^(.*)$ /index.php?link1=developers;
  356. }
  357.  
  358. location = /apps {
  359. rewrite ^(.*)$ /index.php?link1=apps;
  360. }
  361.  
  362. location = /graph {
  363. rewrite ^(.*)$ /index.php?link1=graph;
  364. }
  365.  
  366. location = /oauth {
  367. rewrite ^(.*)$ /index.php?link1=oauth;
  368. }
  369.  
  370. location /boosted {
  371. rewrite ^/boosted-pages$ /index.php?link1=boosted-pages;
  372. rewrite ^/boosted-posts$ /index.php?link1=boosted-posts;
  373. }
  374.  
  375. location = /jobs {
  376. rewrite ^(.*)$ /index.php?link1=jobs;
  377. }
  378.  
  379. location = /common_things {
  380. rewrite ^(.*)$ /index.php?link1=common_things;
  381. }
  382.  
  383. location = /funding {
  384. rewrite ^(.*)$ /index.php?link1=funding;
  385. }
  386.  
  387. location = /my_funding {
  388. rewrite ^(.*)$ /index.php?link1=my_funding;
  389. }
  390.  
  391. location = /create_funding {
  392. rewrite ^(.*)$ /index.php?link1=create_funding;
  393. }
  394.  
  395. location /edit_fund {
  396. rewrite ^/edit_fund/(.*)$ /index.php?link1=edit_fund&id=$1;
  397. }
  398.  
  399. location /show_fund {
  400. rewrite ^/show_fund/(.*)$ /index.php?link1=show_fund&id=$1;
  401. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement