Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 16th, 2012  |  syntax: None  |  size: 0.41 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to automate definition of .htaccess redirects based on content
  2. grep -HEri "Title:(content)" ./www.livesite.com/ > Livesite.txt
  3.        
  4. grep -HEri "Title:(content)" ./www.devsite.com/ > Devsite.txt
  5.        
  6. redirect 301 ^/example_live_path.html ^/different/devsite_path
  7.        
  8. grep -HEri "Title:(content)" ./www.livesite.com/ | xargs 'echo %1; grep -HEri %2 ./www.devsite.com' | xargs 'sed "$anredirect 301 ^%1 ^%2n' .htaccess