> For the complete documentation index, see [llms.txt](https://docs.realmacsoftware.com/classic-manual/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-manual/user-manual/how-to/edit-an-.htaccess-file.md).

# Edit an .htaccess File

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.&#x20;

![The "Edit .htaccess" button can be found in your Publishing setup.](/files/PEJ5uM8op3QaFh6KfoB0)

### 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/_&#x20>;

#### 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.
