Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. RewriteMap subtract prg:/path/to/script/that/subtracts-by-one.sh
  2.  
  3. # to make sure we aren't clobbering legit requests
  4. RewriteCond %{REQUEST_FILENAME} !-f
  5. RewriteCond %{REQUEST_FILENAME} !-d
  6. RewriteCond %{QUERY_STRING} aid=([0-9]+)
  7. RewriteRule ^/?index.php$ /articles/${subtract:%1}/? [L]
  8.  
  9. RewriteCond %{REQUEST_FILENAME} !-f
  10. RewriteCond %{REQUEST_FILENAME} !-d
  11. RewriteCond %{QUERY_STRING} aid=12345
  12. RewriteRule ^/?index.php$ /articles/12344/? [L]
  13.  
  14. RewriteCond %{REQUEST_FILENAME} !-f
  15. RewriteCond %{REQUEST_FILENAME} !-d
  16. RewriteCond %{QUERY_STRING} aid=13337
  17. RewriteRule ^/?index.php$ /articles/13336/? [L]
  18.  
  19. RewriteCond %{REQUEST_FILENAME} !-f
  20. RewriteCond %{REQUEST_FILENAME} !-d
  21. RewriteCond %{QUERY_STRING} aid=19911
  22. RewriteRule ^/?index.php$ /articles/19910/? [L]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement