Note

You are viewing the documentation for an older release of Interworx (6.x). To see documentation for the current generally available release of Interworx, click here: 7.13.

How to: Manage Advanced Settings via .htaccess in SiteWorx

How to: Add a domain wide .htaccess file

  1. Click the Hosting Features menu item if it is not already open.

  2. Click the Htaccess menu item.

  3. Locate the Global Directory Options section.

  4. If a domain wide .htaccess file does not already exist, you will see an Add button. Click this button to add the .htaccess file.

How to: Add a directory specific .htaccess file

  1. Click the Hosting Features menu item if it is not already open.

  2. Click the Htaccess menu item.

  3. Locate the Per Directory Options section.

  4. Choose the directory you want to create this .htaccess file in from the Directory drop-down menu.

  5. If you would like this new .htaccess file to be immediately enabled upon creation, choose “Enabled” from the Status section.

  6. Click the Add button.

How to: Delete the domain wide .htaccess file

  1. Click the Hosting Features menu item if it is not already open.

  2. Click the Htaccess menu item.

  3. Locate the Global Directory Options section.

  4. Click the Delete button.

  5. You will see a confirmation page. Click the Delete button to confirm.

How to: Delete a directory specific .htaccess file

  1. Click the Hosting Features menu item if it is not already open.

  2. Click the Htaccess menu item.

  3. Locate the Per Directory Options section.

  4. Click the checkbox next to the directory or directories you want to delete the .htaccess file from.

  5. Using the drop down at the bottom of the list of directories, select “Delete …”.

How to: Enable a domain wide .htaccess file

  1. Click the Hosting Features menu item if it is not already open.

  2. Click the Htaccess menu item.

  3. Locate the Global Directory Options section.

  4. If a domain wide .htaccess file is currently enabled, you will see aDisable button. Click this button to disable the .htaccess file.

How to: Disable a directory specific .htaccess file

  1. Click the Hosting Features menu item if it is not already open.

  2. Click the Htaccess menu item.

  3. Locate the Per Directory Options section.

  4. Click the checkbox next to the directory or directories you want to disable the .htaccess file in.

  5. Using the drop down at the bottom of the list of directories, select “Disable”.

How to: Add / Edit .htaccess Access Control

  1. Click the Hosting Features menu item if it is not already open.

  2. Click the Htaccess menu item.

  3. Click the [ Access Control ] link for the directory you’d like to manage.

  4. Choose the Access Order. The choices are “Deny first, then allow”, and “Allow first, then deny”.

    • Deny first, then allow - The ‘Blocked Hosts’ list will be evaluated first.

    • Allow first, then deny - The ‘Trusted Hosts’ list will be evaluated first.

  5. Enter hosts or IP addresses on the Trusted Hosts and/or the Blocked Hosts text boxes.

  6. Click the Update button.

How to: Add an Error Document

  1. Click the Hosting Features menu item if it is not already open.

  2. Click the Htaccess menu item.

  3. Click the [ Error Documents ] link for the directory you’d like to manage..

  4. In the “Error Code” column, select the error code from the dropdown list.

  5. In the “Error Page” column, enter the path to your custom error document, relative to the web root. Alternatively, you can enter a fully-qualified URL to another page.

  6. Click the Add button.

How to: Edit an Error Document

  1. Click the Hosting Features menu item if it is not already open.

  2. Click the Htaccess menu item.

  3. Click the [ Error Documents ] link for the directory you’d like to manage..

  4. Click the [ Edit ] link next to the error document you would like to edit.

  5. In the “Error Code” column, select the error code from the dropdown list.

  6. In the “Error Page” column, enter the path to your custom error document, relative to the web root. Alternatively, you can enter a fully-qualified URL to another page.

  7. Click the Save button.

How to: Delete an Error Document

  1. Click the Hosting Features menu item if it is not already open.

  2. Click the Htaccess menu item.

  3. Click the [ Error Documents ] link for the directory you’d like to manage..

  4. Mark the checkboxes for the error documents you wish to delete. You may also click the [ Check All ] link at the bottom of the list to quickly check all the error documents.

  5. In the dropdown labeled with selected:, choose the Delete… option.

  6. You will be asked to confirm the deletion of the error documents. Click the Delete button to finish.

How to: Add a MIME-Type

  1. Click the Hosting Features menu item if it is not already open.

  2. Click the Htaccess menu item.

  3. Click the [ MIME-Types ] link for the directory you’d like to manage..

  4. In the “MIME-Type” column, enter the MIME-Type you would like to use for the given extensions. As you type, the field will auto-complete with various known MIME-Types. MIME-Types must be in the form: “/”.

  5. In the “Extensions” column, enter a space separated list of extensions.

  6. Click the Add button.

How to: Edit a MIME-Type

  1. Click the Hosting Features menu item if it is not already open.

  2. Click the Htaccess menu item.

  3. Click the [ MIME-Types ] link for the directory you’d like to manage.

  4. Click the [ Edit ] link next to the MIME-Type you would like to edit.

  5. In the “MIME-Type” column, enter the MIME-Type you would like to use for the given extensions. As you type, the field will auto-complete with various known MIME-Types. MIME-Types must be in the form: “/”.

  6. In the “Extensions” column, enter a space separated list of extensions.

  7. Click the Save button.

How to: Delete a MIME-Type

  1. Click the Hosting Features menu item if it is not already open.

  2. Click the Htaccess menu item.

  3. Click the [ MIME-Types ] link for the directory you’d like to manage.

  4. Mark the checkboxes for the MIME-Types you wish to delete. You may also click the [ Check All ] link at the bottom of the list to quickly check all the MIME-Types.

  5. In the dropdown labeled with selected:, choose the Delete… option.

  6. You will be asked to confirm the deletion of the MIME-Types. Click the Delete button to finish.

How to:  Add an Apache Handler

  1. Click the Hosting Features menu item if it is not already open.

  2. Click the Htaccess menu item.

  3. Click the [ Handlers ] link for the directory you’d like to manage..

  4. In the “Handler”column, enter the Apache handler you would like to use for the given extensions. As you type, the field will auto-complete with the various default handlers in Apache.

  5. In the “Extensions” column, enter a space separated list of extensions.

  6. Click the Add button.

How to: Edit an Apache Handler

  1. Click the Hosting Features menu item if it is not already open.

  2. Click the Htaccess menu item.

  3. Click the [ Handlers ] link for the directory you’d like to manage.

  4. Click the [ Edit ] link next to the handler you would like to edit.

  5. In the “Handler” column, enter the Apache handler you would like to use for the given extensions. As you type, the field will auto-complete with the various default handlers in Apache.

  6. In the “Extensions” column, enter a space separated list of extensions.

  7. Click the Save button.

How to: Delete an Apache Handler

  1. Click the Hosting Features menu item if it is not already open.

  2. Click the Htaccess menu item.

  3. Click the [ Handlers ] link for the directory you’d like to manage.

  4. Mark the checkboxes for the handlers you wish to delete. You may also click the [ Check All ] link at the bottom of the list to quickly check all the handlers.

  5. In the dropdown labeled with selected:, choose the Delete… option.

  6. You will be asked to confirm the deletion of the Apache handlers. Click the Delete button to finish.

How to: Set a Default Character Set

  1. Click the Hosting Features menu item if it is not already open.

  2. Click the Htaccess menu item.

  3. Click the [ Default Character Set ] link for the directory you’d like to manage.

  4. In the Default Character Set column, enter the default character set you’d like to use. As you type, the field will auto-complete with some of the more commonly used character sets.

  5. Click the Add button.

How to: Edit a Default Character Set

  1. Click the Hosting Features menu item if it is not already open.

  2. Click the Htaccess menu item.

  3. Click the [ Default Character Set ] link for the directory you’d like to manage.

  4. Click the Edit button next to the listed character set.

  5. In the Default Character Set column, enter the default character set you’d like to use. As you type, the field will auto-complete with some of the more commonly used character sets.

  6. Click the Save button.

How to: Delete a Default Character Set

  1. Click the Hosting Features menu item if it is not already open.

  2. Click the Htaccess menu item.

  3. Click the [ Default Character Set ] link for the directory you’d like to manage.

  4. Click the Delete button next to the listed character set.

  5. You will be asked to confirm the deletion of the default character set. Click the Delete button to finish.

How to: Manage PHP variables

  1. Click the Hosting Features menu item if it is not already open.

  2. Click the Htaccess menu item.

  3. Click the [ PHP Variables ] for the directory you’d like to manage.

  4. For each option, there is an “Inherited” setting. When “Inherited” is selected, the PHP variable will inherit its value from the parent directory above. The displayed value shown next to the “Inherited” option is the value that will be used for that directory.

  5. Adjust the PHP settings as desired.

  6. Click the Update button.

Available PHP Variables

Please see the PHP manual for more details about the following settings:

PHP Variable

Description

Magic Quotes GPC

Turns on or off the PHP ‘Magic Quotes GPC’ variable.

Register Globals

Turns on or off the PHP ‘Register Globals’ variable.

Include Path

Sets the PHP ‘Include Path’ variable for this directory and its subdirectories. Multiple paths are separated by a colon (“:”) character. For example: /first/path:/second/path:/third/path

Display Errors

Turns on or off the PHP ‘Display Errors’ variable.

Error Reporting

Sets the PHP ‘Error Reporting’ variable for this directory and its subdirectories.

How to: Add a Redirect Rule

  1. Click the Hosting Features menu item if it is not already open.

  2. Click the Htaccess menu item.

  3. Locate the Global Directory Options section.

  4. Click the [ Redirects ] link.

  5. In the Redirect From column, enter the path, relative to webroot, that you would like to redirect.

  6. In the Redirect To column, enter the URL you would like to redirect to.

  7. For example, to redirect from http://yourdomain.com/some/dir to http://www.domain2.com/foo/bar, you would enter “/some/dir” in the Redirect From column and http://www.domain2.com/foo/bar in the Redirect To column.

  8. Set the redirect type for this redirect rule.

  9. Click the Add button.

How to: Edit a Redirect Rule

  1. Click the Hosting Features menu item if it is not already open.

  2. Click the Htaccess menu item.

  3. Locate the Global Directory Options section.

  4. Click the [ Redirects ] link.

  5. Click the [ Edit ] link next to the redirect rule you would like to edit.

  6. In the Redirect From column, enter the path, relative to webroot, that you would like to redirect.

  7. In the Redirect To column, enter the URL you would like to redirect to.

  8. For example, to redirect from http://yourdomain.com/some/dir to http://www.domain2.com/foo/bar, you would enter “/some/dir” in the Redirect From column and http://www.domain2.com/foo/bar in the Redirect To column.

  9. Set the redirect type for this redirect rule.

  10. Click the Save button.

How to: Delete a Redirect Rule

  1. Click the Hosting Features menu item if it is not already open.

  2. Click the Htaccess menu item.

  3. Locate the Global Directory Options section.

  4. Mark the checkboxes for the redirect rules you wish to delete. You may also click the [ Check All ] link at the bottom of the list to quickly check all the redirect rules.

  5. In the dropdown labeled with selected:, choose the Delete… option.

  6. You will be asked to confirm the deletion of the redirect rules. Click the Delete button to finish.

Redirect Types

Please see the Apache documentation for more information about the different redirect types.

Type

Description

Temporary

Returns a permanent redirect status (301) indicating that the resource has moved permanently.

Permanent

Returns a temporary redirect status (302). This is the default.

See Other

Returns a “See Other” status (303) indicating that the resource has been replaced.

Gone

Returns a “Gone” status (410) indicating that the resource has been permanently removed. When this status is used the URL argument should be omitted.

How to: Manage Indexes

  1. Click the Hosting Features menu item if it is not already open.

  2. Click the Htaccess menu item.

  3. Click the [ Index Management ] link for the directory you’d like to manage.

  4. In the “Default Index Files” text box, enter a list of default index files, on per line. This setting affects when a browser requests a URL that ends in a ‘/’ (a directory). Apache will use this list of files to determine which file to serve. Apache will serve the first file found in the list, from top to bottom.

  5. Set the desired behavior for the “Directory Listing” field. This setting affects when a browser requests a URL that ends in a ‘/’ (a directory), and no Default Index files are found. If set to ‘No’, the browser will receive a ‘403 Forbidden’ response. If set to ‘Yes’, the browser will list the contents of the directory. If set to ‘Inherited’, the setting will be inherited from a parent directory.

  6. Set the desired listing style for the “Directory Listing Style” field. This setting affects how the directory listing will be displayed. If set to ‘Simple Listing’, a simple directory list of files will be displayed. If set to ‘Fancy Listing’, a directory list of files along with timestamps and filesizes will be displayed. If set to ‘Inherited’, the setting will be inherited from a parent directory.

  7. Click the Update button.