> For the complete documentation index, see [llms.txt](https://docs.realmacsoftware.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.realmacsoftware.com/classic/user-manual/how-to/edit-an-.htaccess-file.md).

# Edit an .htaccess File

Use RapidWeaver's built-in publishing engine to edit files on your web server.

To edit a .htaccess file, go to your publishing setup in RapidWeaver, and towards the bottom of the panel, you'll see a button named "Edit .htaccess File" — This will search for your .htaccess file on your web server and preset it in a window ready for editing.

From here you can make changes to your .htaccess file, along with adding a comment for the change you are about to make.

You can roll back to a previous .htaccess file by using the Versions" drop-down menu in the editor window.

![The "Edit .htaccess" button can be found in your Publishing setup.](https://3941723260-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQxK7JyV6iH6ddgHOOt8v%2Fuploads%2FqtBkMHoIwTaqPnVHf1r8%2FCleanShot%202022-05-11%20at%2012.51.16%402x.png?alt=media\&token=02c63da7-df96-44c6-bb25-4b0810d008a6)

### Redirect Examples

Here's an example of redirecting a page. The following code will redirect users trying to access the "/original-page/" to the "/new-page/".

```
Redirect 301 /original-page/ /new-page/
```

If we added the above code to the Realmac Software .htaccess file it would redirect users from this page: *<https://www.realmacvsoftware.com/original-page/>* to this page: *<https://www.realmacvsoftware.com/new-page/>*

#### Redirect with Match

The following example will redirect all subpage URLs from the "/helpdesk/" folder to /support.

```
RedirectMatch 301 ^/helpdesk(.*)$ /support
```

### What's a 301 redirect?

A 301 redirect is **a permanent redirect to the redirected page**. 301 refers to the HTTP status code for this type of redirect. In most instances, the 301 redirect is the best method for implementing redirects on a website.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.realmacsoftware.com/classic/user-manual/how-to/edit-an-.htaccess-file.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
