Page is a not externally linkable
lucy24 - 9:05 pm on Sep 13, 2012 (gmt 0)
I am trying to switch all Redirect 301s
If you've got a whole lot of them, paste them into a text editor that does Regular Expressions and run the following (three separate changes, use the ones you need):
# change . to \.
^(Redirect \d\d\d \S+?[^\\])\.
REPLACE WITH
$1\\.
# now change Redirect to Rewrite
^Redirect(?:Match)? 301 /(.+)
REPLACE WITH
RewriteRule $1 [R=301,L]
# and
^Redirect(?:Match)? 410 /(.+)
REPLACE WITH
RewriteRule $1 - [G,L]