Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

readme.mkd

gen301

Generate HTTP 301 redirect rules from URL lists and filenames.

From a supported input format of URLs, fuzzy search a directory for filenames that are a sub-string of a URL and output a mapping in one of the supported output formats to stdout.

Input formats

An input format can be one (or any) of:

  • Google Webmaster Tools crawl errors CSV file
  • A newline separated list of URLs

Output formats

  • rack-rewrite 301 static redirect
  • Comma separated list

Examples

$ gen301 -use \
    --gcsv /tmp/Web_crawl_error_sources_www_tlvince_com_20110711T030411Z.csv" \
    --plain /tmp/disqus-urls.csv \
    --dirs ~/proj/blog/journal/entry \
    --output rack | sort > /tmp/301s

... which generated these redirects in production.

About

Generate HTTP 301 redirect rules from URL lists and filenames

Resources

Releases

No releases published

Sponsor this project

 
Learn more about GitHub Sponsors

Packages

No packages published

Languages

You can’t perform that action at this time.