Log In     Register    

Super Simple Server
The best way to create your web site.


Redirects
Within your site's 0_site/settings folder, you can put a file named redirects.txt to create redirects from any URL within that site.  Several advanced options are available.  This file is automatically reloaded every 4 minutes.

Here are some examples:

Single URL Redirect
"article1234"="archived_2018_1234"


Directory Redirect To Other Directory
In this example, anything within /my_articles would redirect to the same place within /old_articles.  The line with the * captures URLs with additional names past the match point.  The + at the end includes characters from the original URL that are past the match point, without the leading slash, so it can be used to preserve the remainder of the URL.  The next line with the ^ captures just the exact base URL /my_articles, and makes it redirect to /old_articles.  On the next line, a target of ! specifies no redirect, and the request should pass through and be processed regularly.
"my_articles"={
    "*"="old_articles/+"
    "^"="old_articles"
    "keep"="!"
}


Recursive Redirect To Single URL
This example is the same as the last, except everything redirects to a single URL.  Note the absence of the + at the end of the destination.  The + in the previous example adds additional characters that were past the match point, without the leading slash.
"old_articles"={
    "^"="no_more_archives"
    "*"="no_more_archives"
}


Setting Redirect Base
A match rule "//" can be used to set the redirect base, which will be on the left of the final redirect string.
"old_articles"={
    "^"="no_more_archives"
    "*"="no_more_archives"
    "//"="http://new.example.com"
}


Adding To Redirect Base
A match rule "/" can be used to add to the redirect base, which will be on the left of the final redirect string.
"old_articles"={
    "^"="no_more_archives"
    "*"="no_more_archives"
    "//"="http://new.example.com"
    "specials"={
        "/"="old_specials"
        "*"="not_found"
        "trip_to_paris"="paris"
    }
}




© 2022 Tixati Software Inc.