Quick php script to convert old urls to new urls for .htaccess redirection via csv

quick and dirty script to convert something like this:


http://oldsite.com/foo-stuff.htm,http://newsite.com/foo/

http://oldsite.com/foobarrrrr-stuff.htm,http://newsite.com/foobarrr/

http://oldsite.com/order-page.htm,http://newsite.com/shopping/

to something like this

<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteBase /

      RewriteRule ^foo-stuff.htm$ http://newsite.com/foo/ [R=301,L]
      RewriteRule ^foobarrrrr-stuff.htm$ http://newsite.com/foobarrr/ [R=301,L]
      RewriteRule ^order-page.htm$ http://newsite.com/shopping/ [R=301,L]

</ifModule>

get it at github

no public version. just edit the source code & run on a server. only a single file. don’t use on real sites etc. full of potential bugs.

July 2011 Links/Pages

Misc
paper airplanes

netsec
New clickjacking attacks expose your Gmail messages & Facebook/Twitter identity

programming
All about 64-bit programming in one place – Intel Software Network Blogs – Intel® Software Network.
Manage your wordpress theme using git

software, etc
github for mac