Controller: /siteworx/htaccess

Required Permissions

HTACCESS

Action: accessControl

Added in Version

5.0.15-659

Description

Edit .htaccess access control settings.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

dir

string

Yes

global, /home/example/example.com/html

order

string

Yes

deny,allow, allow,deny

Sets the order in which the Trusted (Allow) and Blocked (Deny) lists are evaluated.<ul><li><b>Deny first, then allow</b> - The ‘Blocked Hosts’ list will be evaluated first.</li><li><b>Allow first, then deny</b> - The ‘Trusted Hosts’ list will be evaluated first.</li></ul>

allow

struct (string)

No

IPs or domain names listed here will be allowed access to this directory and its subdirectories.

deny

struct (string)

No

IPs or domain names listed here will be denied access to this directory and its subdirectories.

Action: add

Added in Version

4.7.0-339

Description

Add a global .htaccess file.

Action: addHandler

Added in Version

5.0.15-659

Description

Add a .htaccess handler setting.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

dir

string

Yes

global, /home/example/example.com/html

handler

string

Yes

extensions

string

Yes

Action: addHtpasswdUser

Added in Version

7.13.28-2647

Description

Add a user in the htpasswd file associated with this htaccess file

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

dir

string

Yes

global, /home/example/example.com/html

username

string

Yes

password

string

Yes

confirm_password

string

Yes

Confirm the password field by providing it again. Must match the password provided.

Action: addMimetype

Added in Version

5.0.15-659

Description

Add a .htaccess mimetype setting.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

dir

string

Yes

global, /home/example/example.com/html

mimetype

string

Yes

extensions

string

Yes

Action: addPer

Added in Version

5.0.15-659

Description

Add an .htaccess file.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

new_dir

string

Yes

/home/example/example.com/html/cgi-bin, /home/example/example.com/html/sub

status

integer

No*

1, 0

enabled

* indicates that it’s actually required, but probably already has a valid default value.

Action: addRedirect

Added in Version

5.0.15-659

Description

Add a .htaccess redirect setting.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

dir

string

Yes

global, /home/example/example.com/html

redir_from

string

Yes

redir_to

string

Yes

status

string

Yes

temp, permanent, seeother, gone

Action: characterSet

Added in Version

5.0.15-659

Description

Edit .htaccess charset setting.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

charset

string

No

UTF-8, ISO-8859-1, UTF-16BE, UTF-16LE, UTF-16, ANSI_X3.4-1968, ISO-10646-UTF-1, ISO_646.basic:1983, INVARIANT, ISO_646.irv:1983, BS_4730, NATS-SEFI, NATS-SEFI-ADD, NATS-DANO, NATS-DANO-ADD, SEN_850200_B, SEN_850200_C, KS_C_5601-1987, ISO-2022-KR, EUC-KR, ISO-2022-JP, ISO-2022-JP-2, ISO-2022-CN, ISO-2022-CN-EXT, JIS_C6220-1969-jp, JIS_C6220-1969-ro, IT, PT, ES, greek7-old, latin-greek, DIN_66003, NF_Z_62-010_(1973), Latin-greek-1, ISO_5427, JIS_C6226-1978, BS_viewdata, INIS, INIS-8, INIS-cyrillic, ISO_5427:1981, ISO_5428:1980, GB_1988-80, GB_2312-80, NS_4551-1, NS_4551-2, NF_Z_62-010, videotex-suppl, PT2, ES2, …

Set the default character set used

Action: delete

Added in Version

4.7.0-339

Description

Delete a .htaccess file.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

dir

struct (string)

Yes

global, /home/example/example.com/html

Action: deleteHandler

Added in Version

5.0.15-659

Description

Delete a .htaccess handler setting.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

handler

struct (string)

Yes

dir

string

Yes

global, /home/example/example.com/html

Action: deleteHtpasswdUser

Added in Version

7.13.28-2647

Description

Delete a user from the htpasswd file associated with this htaccess file

Action: deleteMimetype

Added in Version

5.0.15-659

Description

Delete a .htaccess mimetype setting.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

mimetype

struct (string)

Yes

dir

string

Yes

global, /home/example/example.com/html

Action: deleteRedirect

Added in Version

5.0.15-659

Description

Delete a .htaccess redirect setting.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

redirect

struct (string)

Yes

Redirect one URL to a new URL. The “Redirect From” field takes a path relative to the web root, while the “Redirect To” takes an absolute URL to another site.<br/><br/><b>Example:</b><br/>To redirect from http://yourdomain.com/some/dir to http://www.domain2.com/foo/bar, you would enter<br/><table border><tr><td>Redirect From</td><td>Redirect To</td></tr><tr><td>/some/dir</td><td>http://www.domain2.com/foo/bar</td></tr></table>

dir

string

Yes

global, /home/example/example.com/html

Action: dirIndex

Added in Version

5.0.15-659

Description

Edit .htaccess directory index.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

dir

string

Yes

global, /home/example/example.com/html

default_indexes

struct (string)

No*

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.

listing

string

Yes

inherited, on, off

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.

listing_style

string

Yes

inherited, simple, fancy

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.

* indicates that it’s actually required, but probably already has a valid default value.

Action: disable

Added in Version

4.7.0-339

Description

Disable a .htaccess file.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

dir

string

Yes

global, /home/example/example.com/html

Action: edit

Added in Version

5.0.15-659

Description

Edit an .htaccess file.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

dir

string

Yes

global, /home/example/example.com/html

Action: editHandler

Added in Version

5.0.15-659

Description

Edit a .htaccess handler setting.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

dir

string

Yes

global, /home/example/example.com/html

handler

string

Yes

extensions

string

Yes

Action: editHtpasswdUser

Added in Version

7.13.28-2647

Description

Edit a user in the htpasswd file associated with this htaccess file

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

dir

string

Yes

global, /home/example/example.com/html

username

integer

Yes

Action: editMimetype

Added in Version

5.0.15-659

Description

Edit a .htaccess mimetype setting.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

dir

string

Yes

global, /home/example/example.com/html

mimetype

string

Yes

extensions

string

Yes

Action: editRedirect

Added in Version

5.0.15-659

Description

Edit a .htaccess redirect setting.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

dir

string

Yes

global, /home/example/example.com/html

redir_from

string

Yes

redir_to

string

Yes

status

string

Yes

temp, permanent, seeother, gone

Action: enable

Added in Version

4.7.0-339

Description

Enable a .htaccess file.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

dir

string

Yes

global, /home/example/example.com/html

Action: fail

Added in Version

n/a

Description

Magic function - test for failure mechanism.

Action: passwordProtection

Added in Version

7.13.28-2647

Description

Set password protection in this htaccess file

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

dir

string

Yes

global, /home/example/example.com/html

status

integer

No*

1, 0

0

Whether password protection should be enabled or disabled for this directory. If enabled, only the users listed in the htpasswd file will be able to access this directory and its subdirectories.

* indicates that it’s actually required, but probably already has a valid default value.

Action: phpVar

Added in Version

5.0.15-659

Description

Edit .htaccess php variable setting.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

dir

string

Yes

global, /home/example/example.com/html

magic_quotes_gpc

string

Yes

inherited, on, off

Turns on or off the PHP ‘Magic Quotes GPC’ variable. If set to ‘Inherited’, the value will be set to what is shown between the parenthesis. Please refer to the PHP documentation for more information on the ‘Magic Quotes GPC’ variable.

register_globals

string

Yes

inherited, on, off

Turns on or off the PHP ‘Register Globals’ variable. If set to ‘Inherited’, the value will be set to what is shown between the parenthesis. Please refer to the PHP documentation on more information on the ‘Register Globals’ variable.

include_inherited

integer

No*

1, 0

1

include_path

string

No

Sets the PHP ‘Include Path’ variable for this directory and its subdirectories. If the ‘Inherited’ box is checked, the value will be set to what is shown in the textbox. Please refer to the PHP documentation on more information on the ‘Include Path’ variable.

display_errors

string

Yes

inherited, on, off

Turns on or off the PHP ‘Display Errors’ variable. If set to ‘Inherited’, the value will be set to what is shown between the parenthesis. Please refer to the PHP documentation for more information on the ‘Display Errors’ variable.

report_inherited

integer

No*

1, 0

1

error_reporting

struct (integer)

No

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 32767

Sets the PHP ‘Error Reporting’ variable for this directory and its subdirectories. If the ‘Inherited’ box is checked, the value will be inherited from a parent directory, and the checkboxes will be set accordingly. Please refer to the PHP documentation for more information on the ‘Error Reporting’ variable.

* indicates that it’s actually required, but probably already has a valid default value.

Action: queryCharacterSet

Added in Version

5.1.0-838

Description

Displays the information available to the action “characterSet”.

Sample Output

array (
  'status' => 0,
  'payload' =>
  array (
    'charset' => NULL,
    'dir' => '/home/example/example.com/html/cgi-bin',
  ),
  'reply_code' => 205,
)

Action: queryEdit

Added in Version

5.1.0-838

Description

Displays the information available to the action “edit”.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

dir

string

Yes

global, /home/example/example.com/html

Sample Output

array (
  'status' => 0,
  'payload' =>
  array (
    'dir_copy' => 'global',
    'dir' => 'global',
  ),
  'reply_code' => 205,
)

Action: queryEditHtpasswdUsers

Added in Version

7.13.28-2647

Description

Displays the information available to the action “editRedirect”.

Action: queryGlobalDir

Added in Version

5.0.15-659

Description

Lists information about htaccess.

Sample Output

array (
  'status' => 0,
  'payload' =>
  array (
    0 =>
    array (
      'directory' => '/home/example/example.com/html',
      'status' => true,
    ),
  ),
  'reply_code' => 205,
)

Action: queryHandlers

Added in Version

5.0.15-659

Description

Lists information about Handlers.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

dir

string

Yes

global, /home/example/example.com/html

Action: queryHtpasswdUsers

Added in Version

7.13.28-2647

Description

@param Form_SW_Htaccess_Dir $Form

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

dir

string

Yes

global, /home/example/example.com/html

Action: queryMimetypes

Added in Version

5.0.15-659

Description

Lists information about Mimetypes.

Action: queryPasswordProtection

Added in Version

7.13.28-2647

Description

@param Form_SW_Htaccess_Dir $Form

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

dir

string

Yes

global, /home/example/example.com/html

Action: queryPerDir

Added in Version

5.0.15-659

Description

Lists information about htaccess.

Sample Output

array (
  'status' => 0,
  'payload' =>
  array (
  ),
  'reply_code' => 205,
)

Action: queryRedirects

Added in Version

5.0.15-659

Description

Lists information about Redirects.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

dir

string

Yes

global, /home/example/example.com/html

Action: reroute

Added in Version

n/a

Description

Action to re-route from the current controller to a different one.

Action: win

Added in Version

n/a

Description

Magic function - test for testing success mechanism.