Directory Options - explained to a 6th grader

With the issue of InterWorx 3.0 a really nice feature that was added is the Directory Options.

The only problem is no one really knows what the are really for, or how to use them in every day real world.

Anyone in the know interested in writing up a explanation for each directory option below so that a 6th grader can fully understand it?

Some I have a full understanding but some I personally would like a real word example on how to use them, thanks.

  • [ Access Control ]
  • [ Error Documents ]
  • [ MIME-Types ]
  • [ Handlers ]
  • [ Default Character Set ]
  • [ PHP Variables ]
  • [ Redirects ]
  • [ Index Management ]
  • [ Hotlink Protection ]

R-n-R,

When I have time a more detailed description of this will be written up for the site. That being said, most of these are options that an advanced website owner will use, so making them understandable to a fifth grader might be a stretch :wink:

Off the top of my head:

AccessControl: lets you specify hosts (ip addresses, domains) which are allowed OR are forbidden to access content in the specified directory.
Error Documents: allows you to specify the document to be loaded when a particular apache webserver error occurs. (e.g. Error 404 can have something like 404.html )
MIME Types: not sure off hand – anyone have a good description?
Handlers: ditto
Default Character Set: allows you to specify a text character set other than the system default of ASCII (useful mostly to non English speakers)
PHP Variables: Allows you to override some of the variables in php.ini (e.g safe mode status, memory usage) on a directory by directory basis
Redirects: is used to have a particular url point to a page on your site, for examble interworx.com/install will forward the user to: interworx.com/support/docs/iworx-cp/install/script-install it can be used to shorten long url’s like this or to make “nice” url’s for specific pages on your site when for example you want to print the url somewhere and what it to be easy and memorable for someone to manually type it into your browser, businesses often use this to load a page in their shopping cart system with a featured product.
Index Management: allows you to specify the default page loaded in a particular site, or directory within a site. This is what automatically loads mysite.com/index.htm when you type mysite.com. It could be configured to load index,php index,shtnl default.htm or even something like start.htm
Hotlink protection: prevents someone from putting an image from your site on their own by linking to yoursite,com/image/myimage.gif instead of copying it to their own site and thus steeling your bandwidth.

What are you unclear on?

[quote=IWorx-Tim;15015]R-n-R,

so making them understandable to a fifth grader might be a stretch ;-)[/quote] Actually your work has been made easier, I requested understandable to a 6thgrader. :stuck_out_tongue:

What I am looking for is everyday practical uses for these that the average “joe webmaster” could use them, if show, say a “How To Video”. I am making up some how to videos and would like to use some practical everyday uses that the average webmaster would find useful.

These are the ones, that I am having a issue with. Anyone have some good useful examples that the average non-server admin could use to enhance their web site in some way?

I am looking for good examples of use that I could show in the video.

I have some good ideas as demos for this, but always looking for better ideas.

That is good, and pretty straight forward

[quote=IWorx-Tim;15015]Hotlink protection: prevents someone from putting an image from your site on their own by linking to yoursite,com/image/myimage.gif instead of copying it to their own site and thus steeling your bandwidth.

[/quote]I have a good example in mind to show how to use this effectively on the video.

So I guess its the, MIME Types, Handlers, Default Character Set, PHP Variables that I need assistance on in making up my How To video as for as examples of use.

Thanks guys for the input.

Handlers I’d imagine are for specifying what ‘engine’ a particular file extension goes through.

For instance some people like to parse .html files as php, so they’d have a x-httpd-php .html (or something close) in their handlers control.

I had some redirects setup in the .htaccess file and it was working fine after I moved back to iworx host (from cpanel) as I just transfered files using a tar.gz file. But, (I guess I remember correctly) after I clicked on the Directory Options (I just wanted to see what and how are the features), I came to realize that the redirects were not working.

Luckily, I had a backup of the .htaccess as a txt file on the same folder and I restored it and didn’t go to the ‘Directory Options’ page till now. :slight_smile: (don’t want to do any experimenting now, may be later I can do that)

Is that a bug?

(I guess iworx is designed as config file friendly panel, so it shouldn’t affect with the existing settings, or it should have atleast taken a backup of .htaccess, or notified beforehand that so and so features may not work when we visit to that page first time)

[quote=tiger;15021]I had some redirects setup in the .htaccess file and it was working fine after I moved back to iworx host (from cpanel) as I just transfered files using a tar.gz file. But, (I guess I remember correctly) after I clicked on the Directory Options (I just wanted to see what and how are the features), I came to realize that the redirects were not working.

Luckily, I had a backup of the .htaccess as a txt file on the same folder and I restored it and didn’t go to the ‘Directory Options’ page till now. :slight_smile: (don’t want to do any experimenting now, may be later I can do that)

Is that a bug?

(I guess iworx is designed as config file friendly panel, so it shouldn’t affect with the existing settings, or it should have atleast taken a backup of .htaccess, or notified beforehand that so and so features may not work when we visit to that page first time)[/quote]

Actually, unless there have been changes I don’t know about this is the expected behavior (I’m assuming you enabled a .htaccess file and made some edits), Directory Options does sometimes mangle existing .htaccess files unless you put special characters around them. Any custom content MUST be above the iworx content.

Here’s an example of a .htaccess file edited by Directory Options:

cat .htaccess

ALL CUSTOM ENTRIES SHOULD GO ABOVE THIS LINE

BEGIN IWORX header

This file was created by InterWorx-CP

You may modify this file, but any changes made between

BEGIN IWORX and END IWORX tags may be lost on future

updates. Additionally, changes NOT made between these

tags will not be recognized in the SiteWorx interface.

END IWORX header

BEGIN IWORX accesscontrol

Order deny,allow

END IWORX accesscontrol

BEGIN IWORX errordocs

ErrorDocument 400 400.htm
ErrorDocument 404 404.html

END IWORX errordocs

BEGIN IWORX mimetypes

END IWORX mimetypes

BEGIN IWORX handlers

END IWORX handlers

BEGIN IWORX charset

END IWORX charset

BEGIN IWORX redirects

END IWORX redirects

BEGIN IWORX phpvars

END IWORX phpvars

BEGIN IWORX dirindex

DirectoryIndex index.php index.html index.htm index.shtml

END IWORX dirindex

BEGIN IWORX hotlink

RewriteCond %{HTTP_REFERER} !^http://testitout.com [NC]
RewriteCond %{HTTP_REFERER} !^http://www.testitout.com [NC]

END IWORX hotlink

Anything not inside these iworx comments would be overwritten the next time the .htaccess file is edited/written to the file.

[quote=R-n-R;15017]

So I guess its the, MIME Types, Handlers, Default Character Set, PHP Variables that I need assistance on in making up my How To video as for as examples of use.

Thanks guys for the input.[/quote]

Most of these are probably not going to be used by Joe Webmaster :wink:

I think the best way to understand these things is to just play around with them. What I do when I want to experiment with something in iworx and not damage an existing account is to create a separate siteworx account with a name like dummysite.com or whatever and just play around freely. It does not have to be a real domain.

In taking a closer look at the interface it seems the only php varialbles you can edit in the interface are:

                                                                                                 Magic Quotes GPC:             On                                                                                                   Off                                                                                                                           

Register Globals: On Off
Include Path:
Display Errors:On Off
Error Reporting: [?] Errors Warnings Parse Errors Notices Core Errors Core Warnings Compile Errors Compile Warnings User Errors User Warnings User Notices

These would mostly be used to override the system default on one of these settings when you install a cms or other script and the sysadmin can’t/wont change the system wide settings.

Thanks Tim, for the info.

For some reason hotlink protection is not working for me. The code looks right so I’m not sure what else to try.

RewriteRule .*\.(jpg|gif)$ - [L]

to

RewriteRule .*\.(jpg|gif)$ - [F]

fixed it

What about password protection made from within SiteWorx?

I don’t think this is possible, because of a potential class with the one already included within filemanager :S