replacing url's

User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

replacing url's

Post by Thunderstone »



We are changing our home URL. Short of re-building
the database, iIs there a way to
globally replace URL roots in refs and html?
e.g. replace http://ericae2.educ.cua.edu/...
with http://ericae.net/...


---------------------------------------------------------------
Larry Rudner rudner@cua.edu
ERIC Clearinghouse on 800 464-3742 (800 Go4-ERIC)
Assessment and Evaluation 202 673-3811
Catholic University of America FAX: 202 319-6692
Washington, DC 20064 http://ericae.net


User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

replacing url's

Post by Thunderstone »




Yes you can, but do you want to...?

Updating the entire database will invalidate the search indices and
make searches perform poorly (also, ranked searches will not return the
expected hits) until you finish the update and reindex.

Re-walking will give you the benefit of helping you verify that your web site
is consistent with its new name.

Walking to a new database will save you from the possibility of wrecking
your live database with a typo in your SQL command.

If you still want to perform the update, you can use the texis executable
to perform the update. Also, since the entire index will be invalidated,
you might as well drop it to make the update go a little faster.

gw -d/The/Database -unindex

texis -s -d /The/Database -u _SYSTEM -p "" "update html set Url='ericae.net'+Url-'ericae2.educ.cua.edu' where Url matches 'ericae2.educ.cua.edu%'"

texis -s -d /The/Database -u _SYSTEM -p "" "update refs set Url='ericae.net'+Url-'ericae2.educ.cua.edu', Ref='ericae.net'+Url-'ericae2.educ.cua.edu' where Url matches 'ericae2.educ.cua.edu%'"

texis -s -d /The/Database -u _SYSTEM -p "" "update options set String='http://ericae.net'+String-'http://ericae2.educ.cua.edu' where Name='URL' and String matches 'http://ericae2.educ.cua.edus%'"

gw -d/The/Database -index