A simple pastebin you can run on any server with Apache and PHP.
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

1234567891011121314151617181920212223242526272829303132333435363738
  1. Options +MultiViews
  2. AddCharset utf-8 .html .css .php .txt .js
  3. RewriteEngine on
  4. RewriteBase /textfiles/
  5. # Send requests without parameters to textfiles.php.
  6. # RewriteRule ^$ textfiles.php [L]
  7. # Send requests for index.php to textfiles.php.
  8. # RewriteRule ^index\.php$ textfiles.php [L]
  9. # Send requests for index.html to textfiles.php.
  10. # RewriteRule ^index\.html$ textfiles.php [L]
  11. # Send requests for textfiles.css to textfiles.css.
  12. RewriteRule ^textfiles\.css$ textfiles.css [L]
  13. # Send requests for textfiles.js to textfiles.js.
  14. RewriteRule ^textfiles\.js$ textfiles.js [L]
  15. # Send requests for textfiles.php to textfiles.php.
  16. RewriteRule ^textfiles\.php$ textfiles.php [L]
  17. # Send requests for textfiles.html to textfiles.php.
  18. # NOTE: THIS IS NOT A TYPO!
  19. RewriteRule ^textfiles\.html$ textfiles.php [L]
  20. # Send requests for files that exist to textfiles.php (raw).
  21. RewriteCond %{REQUEST_URI} ^\/textfiles\/(.+)/raw$
  22. RewriteCond /file/path/to/your/textfiles/%1 -f
  23. RewriteRule ^(.+)/raw$ textfiles.php?f=$1&m=raw [QSA,L]
  24. # Send requests for files that exist to textfiles.php.
  25. RewriteCond %{REQUEST_URI} ^\/textfiles\/(.+)$
  26. RewriteCond /file/path/to/your/textfiles/%1 -f
  27. RewriteRule ^(.+)$ textfiles.php?f=$1 [QSA,L]