A simple pastebin you can run on any server with Apache and PHP.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

_htaccess 1.2KB

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]