Artica Wiki

Rewrite rules

Rewrite rules modify part or all of the URL path in the user's request

Rewrite rules modify part or all of the URL path in the user's request.
usually for one of two purposes:

Build a rewrite rule

The Request field

There are 3 ways to represent these 3 source urls in this section

The Rewrite To field

This is the destination of the request, the one that must actually exist on your Web server.
If you're using a regular expression with groups, then it's possible to specify the group result with a dollar followed by the number corresponding to the group ($1, $2, $3...).

The Option field

The Option field let you select 4 ways:

  1. Start at the new calculated location: This is the most common option, it stops current processing and starts the search for a new location corresponding to the modified URI, so you can specify a defined path , for example.
  2. Stop rules processing: stops processing the current set ( similar to 1 but continues applies next other settings)
  3. Permanent redirection: Return a 301 code and ask the browser to return back with the correct uri.
  4. Temporary redirection: Return a 302 code and ask the browser to return back with the correct uri.

This is the rule that applies to the examples given in this article.

Another alternative is to use a regular expression