![]() |
Any geeks here? Let me stick my fuzzy logic in your bash script.
Anyone know the difference between the md5 hashes php generates and a unix md5 password hash? Setting up a freehost and I don't want to use DES passwords.
|
Ok.. this might be more up your alley:
What types of files does a gallery owner REALLY need to serve. I'm intending to limit it down to these types: .html .htm (unconditionally) .jpg .gif .png (if the refferer is good) Am I missing anything vital? I'll setup another one that allows movies under 400k later, but I need to get this up and running pretty fast so i can be bling bling like the big boys. I ate wendy's and my $15 is gone. |
Only allow them to upload .bmp's, .pdfs, and .html
|
oh, and .tar.gz
that ones important |
Can anyone help me with this rewrite rule?
RewriteBase / RewriteCond %{REQUEST_FILENAME} !^.*\.html$ [NC] RewriteCond %{REQUEST_FILENAME} !^.*\.htm$ [NC] RewriteCond %{REQUEST_FILENAME} !^.*\.jpg$ [NC] RewriteCond %{REQUEST_FILENAME} !^.*\.jpeg$ [NC] RewriteCond %{REQUEST_FILENAME} !^.*\.gif$ [NC] RewriteCond %{REQUEST_FILENAME} !^.*\.png$ [NC] RewriteCond %{REQUEST_FILENAME} !^.*\.swf$ [NC] RewriteRule ^.*$ - [F] This works fine, except when you try to get a directory index without specifying a filename. So I tried adding: RewriteCond %{REQUEST_FILENAME} !^$ [NC] as part of the rule, but to no avail -- I still get a forbidden on directory indexes unless I specify the filename. |
If anyone is interested, I've seriously simplified it, but it still has the same flaw.. my rule is now:
RewriteBase / RewriteRule !\.(html|htm|gif|jpg|swf|css|png)$ - [F] |
I guess the geeks are only up during the day.
Just in case someone else needs this: <Directory /whatever/dir/your/freehosting/is/in/> RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://www.theadultwire.com.*$ [NC] RewriteRule ^.*\.(gif|jpg|swf|css|png)$ - [F] RewriteCond %{REQUEST_FILENAME} !-d RewriteRule !\.(html|htm|gif|jpg|swf|css|png)$ - [F] Action add-footer /cgi-bin/wrapper.sh AddHandler add-footer .html .htm DirectoryIndex index.html index.htm default.html default.htm Options None Options SymLinksIfOwnerMatch </Directory> --- Now why didn't I think of that in the first place??? |
All times are GMT -7. The time now is 10:37 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123