incrediBILL

msg:4420549 | 4:40 pm on Feb 22, 2012 (gmt 0) |
How will people know the folder is there unless you publish links using the folder name? Putting an index file in your folder blocks a directory listing. Just make your index file say "Page not found" - much simpler than mucking around in .htaccess
|
wilderness

msg:4420556 | 5:01 pm on Feb 22, 2012 (gmt 0) |
UNTESTED, worth a try: RewriteCond %{REQUEST_URI} /path-to-directory/\.swf RewriteCond %{HTTP_REFERER} !^http://(www\.)?example\.com [NC] RewriteRule .* - [F]
|
lucy24

msg:4420667 | 9:47 pm on Feb 22, 2012 (gmt 0) |
| Putting an index file in your folder blocks a directory listing. |
| So does a single-line htaccess file: Options -Indexes ... except that you don't need to, because that's already your default isn't it? The form Options All -Indexes is likely to be a big, big mistake: Warning Mixing Options with a + or - with those without is not valid syntax, and is likely to cause unexpected results. |
| When Apache docs put up a warning, pay attention. The "unexpected results" is a euphemism for "disastrously unwanted results" ;)
|
hiccupsheadache

msg:4421285 | 11:42 am on Feb 24, 2012 (gmt 0) |
Sorry i'm confused - would i be better to have: Options -Indexes or Options All -Indexes In my htaccess file?
|
lucy24

msg:4421498 | 10:01 pm on Feb 24, 2012 (gmt 0) |
The first. The second is the "unexpected results" version. And the line should go in your top-level htaccess, because auto-indexing would normally be off by default. (You can turn it on in individual directories.) Turning specific options off or on has no effect on other options. The default is "All", which means ... "All except MultiViews". (At least it does in Apache 2.2. It may be necessary to add this disclaimer to all statements about Apache everywhere ;)) | Any options preceded by a + are added to the options currently in force, and any options preceded by a - are removed from the options currently in force. |
|
|
|