The switchback
Old page A points at B, and B was moved again to C. Visitors take two hops and search engines may stop following. Trail Signs collapses every chain to one hop.
1 chain collapsed in the example
Redirect maps for rebuilt websites
A new website almost always changes its page addresses. Every old address that is not sent somewhere becomes a dead end for bookmarks, search results and links from other sites. Paste your old addresses and your new pages: Trail Signs matches them, finds the chains, loops and dead ends, and writes exact 301 rules for Apache and nginx.
Open the Map MakerSee the fourteen checks
Free maps up to 50 rules. Trail Pass $1.95 a month or $19.50 a year: free during preview, no checkout yet.
The worked example has eleven lines. Trail Signs found all three of these in it, before any of it reached a server.
Old page A points at B, and B was moved again to C. Visitors take two hops and search engines may stop following. Trail Signs collapses every chain to one hop.
1 chain collapsed in the example
Two rules point at each other, or a page points at itself. The browser goes round until it gives up with "too many redirects". Those rules are left out and named.
3 loop or self rules stopped in the example
An old address with no target answers 404. Trail Signs looks through your new page list for the same page name or the closest words and suggests a target you can accept.
2 targets suggested in the example
Five steps, one page. Your addresses are sent to this site to work out the map and are not kept: nothing is stored until you save it to a Trail Book.
/about-us.html -> /about..htaccess, nginx, or a plain list for a host's redirect panel.Apache's short Redirect /blog /news also moves /blog/any-post to /news/any-post. Trail Signs writes one anchored rule per page instead, escapes the characters that mean something to the server (%, $, spaces, dots), and puts query-string rules first so they are not swallowed.
# Redirect map from hillbillyhosting.org (Trail Signs). 6 rule(s), 301 = moved for good.
# Put these lines in the .htaccess file of your site's top folder, ABOVE any CMS block (for example "# BEGIN WordPress").
# Needs Apache 2.4 with mod_rewrite. Each rule matches one exact address (not everything under it).
<IfModule mod_rewrite.c>
RewriteEngine On
# line 4: /rates.php?id=12 -> /stay/rates/group
RewriteCond %{QUERY_STRING} ^id=12$
RewriteRule ^rates\.php/?$ /stay/rates/group [R=301,L,NE,QSD]
# line 1: /about-us.html -> /about
RewriteRule ^about-us\.html/?$ /about [R=301,L,NE]
# line 2: /our-cabins.html -> /cabins
RewriteRule ^our-cabins\.html/?$ /cabins [R=301,L,NE]
# line 3: /stay/cabins -> /cabins
RewriteRule ^stay/cabins/?$ /cabins [R=301,L,NE]
# line 5: /contact.html -> /contact
RewriteRule ^contact\.html/?$ /contact [R=301,L,NE]
# line 6: /Contact.html -> /contact
RewriteRule ^Contact\.html/?$ /contact [R=301,L,NE]
</IfModule>
# Redirect map from hillbillyhosting.org (Trail Signs). 6 rule(s), 301 = moved for good.
# Paste inside the server { } block of your site, then run: nginx -t && nginx -s reload
# If a location below already exists in your config, keep one of them (nginx refuses duplicates).
# line 4
if ($request_uri = "/rates.php?id=12") { return 301 "/stay/rates/group"; }
# line 1
location = "/about-us.html" { return 301 "/about$is_args$args"; }
location = "/about-us.html/" { return 301 "/about$is_args$args"; }
# line 2
location = "/our-cabins.html" { return 301 "/cabins$is_args$args"; }
location = "/our-cabins.html/" { return 301 "/cabins$is_args$args"; }
# line 3
location = "/stay/cabins" { return 301 "/cabins$is_args$args"; }
location = "/stay/cabins/" { return 301 "/cabins$is_args$args"; }
# line 5
location = "/contact.html" { return 301 "/contact$is_args$args"; }
location = "/contact.html/" { return 301 "/contact$is_args$args"; }
# line 6
location = "/Contact.html" { return 301 "/contact$is_args$args"; }
location = "/Contact.html/" { return 301 "/contact$is_args$args"; }
/rates.php?id=12 -> /stay/rates/group /about-us.html -> /about /our-cabins.html -> /cabins /stay/cabins -> /cabins /contact.html -> /contact /Contact.html -> /contact
Day hike
Free
Trail Pass
$1.95 a month
or $19.50 a year
.htaccess, nginx, list, CSVFree during preview. Checkout is not open yet, so every Trail Pass feature is on for everyone and nobody is charged.