File Processing help wanted

David Chart yellowdog-general@lists.terrasoftsolutions.com
Sat, 28 Aug 2004 13:26:00 +0900


R. Hirschfeld wrote:

>>>But if the structure of the new website is the same as the old one I
>>>think it would be better just to put a single redirect in httpd.conf.
>>>Bookmarks to the depths of the hierarchy on the old site will then be
>>>redirected to the same place on the new site.
>>>
>>
>>This would be ideal, but I'm not sure I can do it. I don't control the 
>>web server in question, so I only have access to my home directory. If I 
>>could do it, what would I have to put in the file, and where would it live?
> 
> 
> Sorry, I assumed that you were running the web server, and further,
> that it was apache.  You would need to locate the apache configuration
> file httpd.conf on the old server (which could live in any of various
> places depending on the OS of the server and/or the whim of its
> sysadmin), and add a line of the form:
> 

Hmmm. I strongly suspect I can't do this. Looks like I'll go for 
replacing all the files.

>>
>>I tried this and discovered that @ needs to be escaped as well. Still, 
>>the syntax worked perfectly, so this saved me a lot of effort. Thanks 
>>very much for your help!
> 
> 
> Sure, glad I could be of help.  Sorry about the @.  BTW, sed might be
> more appropriate than perl for the substitution (it's probably more
> efficient), but some versions of sed (including the older GNU version
> in YDL 3.0.1) don't seem to have an in-place (-i) option.
> 

Efficiency wasn't a big concern. My website is big in the sense of 'I 
really, really don't want to change those links by hand', but not that 
big in computer terms. Worked very quickly.

Thanks again.

-- 
David Chart
http://www.davidchart.com/
PGP Key: 1786 15B1 53A3 7ED0 CBD4 AFBE 9B61 6D10 46C9 1CBE