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 |
---|---|---|---|---|---|
|
string |
Yes |
global, /home/example/example.com/html |
||
|
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> |
|
|
struct (string) |
No |
IPs or domain names listed here will be allowed access to this directory and its subdirectories. |
||
|
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 |
---|---|---|---|---|---|
|
string |
Yes |
global, /home/example/example.com/html |
||
|
string |
Yes |
|||
|
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 |
---|---|---|---|---|---|
|
string |
Yes |
global, /home/example/example.com/html |
||
|
string |
Yes |
|||
|
string |
Yes |
|||
|
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 |
---|---|---|---|---|---|
|
string |
Yes |
global, /home/example/example.com/html |
||
|
string |
Yes |
|||
|
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 |
---|---|---|---|---|---|
|
string |
Yes |
/home/example/example.com/html/cgi-bin, /home/example/example.com/html/sub |
||
|
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 |
---|---|---|---|---|---|
|
string |
Yes |
global, /home/example/example.com/html |
||
|
string |
Yes |
|||
|
string |
Yes |
|||
|
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 |
---|---|---|---|---|---|
|
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 |
---|---|---|---|---|---|
|
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 |
---|---|---|---|---|---|
|
struct (string) |
Yes |
|||
|
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 |
---|---|---|---|---|---|
|
struct (string) |
Yes |
|||
|
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 |
---|---|---|---|---|---|
|
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> |
||
|
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 |
---|---|---|---|---|---|
|
string |
Yes |
global, /home/example/example.com/html |
||
|
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. |
||
|
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. |
|
|
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 |
---|---|---|---|---|---|
|
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 |
---|---|---|---|---|---|
|
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 |
---|---|---|---|---|---|
|
string |
Yes |
global, /home/example/example.com/html |
||
|
string |
Yes |
|||
|
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 |
---|---|---|---|---|---|
|
string |
Yes |
global, /home/example/example.com/html |
||
|
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 |
---|---|---|---|---|---|
|
string |
Yes |
global, /home/example/example.com/html |
||
|
string |
Yes |
|||
|
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 |
---|---|---|---|---|---|
|
string |
Yes |
global, /home/example/example.com/html |
||
|
string |
Yes |
|||
|
string |
Yes |
|||
|
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 |
---|---|---|---|---|---|
|
string |
Yes |
global, /home/example/example.com/html |
Action: fail
¶
- Added in Version
n/a
- Description
Magic function - test for failure mechanism.
Action: hotlink
¶
- Added in Version
5.0.15-659
- Description
Edit .htaccess hotlink setting.
Input Parameters¶
Name |
Type |
Required? |
Example Values |
Default Values |
Notes |
---|---|---|---|---|---|
|
string |
Yes |
global, /home/example/example.com/html |
||
|
string |
Yes |
off, on |
Turns hotlink protection on or off. |
|
|
struct (string) |
No |
Sets the list of extensions that will be protected from hotlinking. |
||
|
struct (string) |
No |
{“http://example.com”:”http://example.com”,”http://www.example.com”:”http://www.example.com”} |
Sets the list of allowed domains that are allowed to hotlink to files with the listed extensions. The current SiteWorx domain will always be allowed to hotlink to the listed extensions. |
|
|
string |
No* |
off, on |
off |
This option allows “direct access” to the list of protected extensions. “Direct access” typically means the URL of the file is typed directly into the browser, and not linked from another page. More specifically, “Direct access” allows access to the protected extensions when the HTTP_REFERER field is empty. |
|
string |
No |
When this option is set with a valid absolute URL to an image file (e.g., http://www.somedomain.com/replaceimg.jpg), a hotlinked image will be replaced with this URL. If this option is not set, a hotlinked image will return a ‘403 Forbidden’ response. |
* indicates that it’s actually required, but probably already has a valid default value.
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 |
---|---|---|---|---|---|
|
string |
Yes |
global, /home/example/example.com/html |
||
|
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 |
---|---|---|---|---|---|
|
string |
Yes |
global, /home/example/example.com/html |
||
|
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. |
|
|
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. |
|
|
integer |
No* |
1, 0 |
1 |
|
|
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. |
||
|
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. |
|
|
integer |
No* |
1, 0 |
1 |
|
|
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 |
---|---|---|---|---|---|
|
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 |
---|---|---|---|---|---|
|
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 |
---|---|---|---|---|---|
|
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 |
---|---|---|---|---|---|
|
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 |
---|---|---|---|---|---|
|
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.