piterskiy

Nginx rewrite for Autodor

Feb 25th, 2018
24,716
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. location = /robots.txt {
  2.   rewrite ^(.*)$ /index.php?feed=robots;
  3. }
  4.  
  5. location = /rss/ {
  6.   rewrite ^(.*)$ /index.php?feed=rss;
  7. }
  8.  
  9. location = /sitemap/ {
  10.   rewrite ^(.*)$ /index.php?feed=sitemap;
  11. }
  12.  
  13. location /sitemap {
  14.   rewrite ^/sitemap\/([0-9]+)/$ /index.php?feed=sitemap&p=$1;
  15. }
  16.  
  17. location /category {
  18.   rewrite ^/category/([0-9]+)/$ /index.php?category=$1;
  19. }
  20.  
  21. location /tag {
  22.   rewrite ^/tag/(.*)/$ /index.php?search=$1;
  23. }
  24.  
  25. location /page {
  26.   rewrite ^/page/(.*)/$ /index.php?page=$1;
  27. }
Add Comment
Please, Sign In to add comment