Skip to content

Knowledgebase

Using SiteWorx advanced .htaccess controls carefully

control-panels, security-ssl

The SiteWorx Htaccess interface controls directory-level web settings such as redirects, access rules and content handling. A rule at the domain root can affect nested paths, so scope each change deliberately.

What you need before you begin

Back up the existing .htaccess file, including application-generated rewrite blocks. Identify the required directory and confirm the directive is supported by the server’s active web and PHP configuration.

01 Use SiteWorx advanced .htaccess controls carefully

  1. Open Hosting Features > Htaccess, select the correct domain and log in to its directory-options view.
  2. Choose the exact existing directory configuration or create the intended custom-directory configuration. Avoid a global-root change for a single preview folder.
  3. Edit the relevant setting, such as access control or a redirect, and read how its order interacts with existing rules.
  4. Save one change at a time. If adding custom text, preserve the panel’s and application’s managed blocks and use the supported placement.
  5. Test both a request that should match and one that should remain unaffected. Review web-server logs if a 403, 500 or redirect loop appears.

Confirm the expected result

The targeted behaviour should work without breaking application routes or unrelated domains. Keep a dated copy and brief explanation of each custom rule.

Troubleshoot unexpected results

If a page fails immediately, restore the saved file and inspect syntax or unsupported directives. PHP settings suitable for one handler may fail under another. Do not replace the entire application .htaccess with a short example from an unrelated tutorial.

Can I safely apply a rule to every subdirectory?

Only after checking inheritance and the application’s routing. A root-level setting can reach more paths than intended; choose a narrower directory when the requirement is local.

Was this answer helpful?

Need a little more help?

Our support team can help you find the next step.

Contact support

Powered by WHMCompleteSolution