Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Options +FollowSymLinks
- RewriteEngine On
- RewriteRule ^img-(.*).html img.php?id=$1 [L]
- RewriteRule ^slide-(.*).html slider.php?id=$1 [L]
- RewriteRule ^page-(.*).html page.php?name=$1 [L]
- RewriteRule ^contact.html$ contact.php [QSA,L,NC]
- RewriteEngine On
- RewriteCond %{HTTP_REFERER} !^http://(.+.)?foo.com/ [NC]
- RewriteCond %{HTTP_REFERER} !^$
- RewriteRule .*.(jpe?g|gif|bmp|png)$ nohotlink.gif [L]
- <Files ~ ".(php|sql|php3|php4|phtml|pl|py|jsp|asp|htm|shtml|sh|cgi)$">
- order allow,deny
- deny from all
- </Files>
- RewriteEngine Off
- # nginx configuration
- location /img {
- rewrite ^/img-(.*).html /img.php?id=$1 break;
- }
- location /slide {
- rewrite ^/slide-(.*).html /slider.php?id=$1 break;
- }
- location /page {
- rewrite ^/page-(.*).html /page.php?name=$1 break;
- }
- location /contact {
- rewrite ^/contact.html$ /contact.php break;
- }
- # nginx configuration
- location /upload {
- if ($http_referer !~ "^http://(.+.)?foo.com/"){
- rewrite .*.(jpe?g|gif|bmp|png)$ /nohotlink.gif break;
- }
- }
- location ~ .(php|sql|php3|php4|phtml|pl|py|jsp|asp|htm|shtml|sh|cgi)$ {
- deny all;
- }
- # nginx configuration
- location /upload/small {
- }
- location / {
- try_files $uri $uri/ /index.php;
- include /etc/nginx/includes/root.access;
- }
- location /upload {
- include /etc/nginx/includes/upload.access;
- }
- location /upload/small {
- include /etc/nginx/includes/small.access;
- }
- [error] 18156#0: *7 access forbidden by rule, client: 111.**.**.**, server: foo.com, request: "POST /upload.php HTTP/1.1", host: "foo.com", referrer: "http://foo.com/"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement