Webmastersite.net
Register Log In

Matching URLs when renewing data

Comments on Matching URLs when renewing data

webflair
Forum Regular

Usergroup: Customer
Joined: Nov 27, 2006

Total Topics: 187
Total Comments: 465
Matching URLs when renewing data
Posted Apr 17, 2012 - 10:01 AM:

I purchased a database and imported it into a directory... These were give URLs such as www.mysite.com/category/abusiness-321.html

Since then I have had this database cleansed and out of date records removed, but if I delete the old listing and import the new database, listing will have new URLs due to an inevitable change of link ID.

So how can I deal with this so that I don't loose all of my OLD urls, or at least the old URLs are redirected to new?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Apr 18, 2012 - 3:56 PM:

This database is a spreadsheet or the like? Can you export a list of only the URLs (or some unique identifying field if the listings don't have URLs) that you want to delete? Maybe a file comparison tool could output the difference between the before and after databases. If you could get that, then a deleter script would be relatively simple to write. Otherwise, I don't see any way to retain or redirect URLs... well, maybe if there's a unique id field that remains constant in all versions of the database you could get the database loaded in phpmyadmin, export it as 'update' statements instead of 'insert' (I think that's an option in phpmyadmin) and load that onto the wsn database to update blank values into the want-to-delete ones and use that to delete them with a query... all of which is academic since odds are you don't have a static id number field that's the same in all three places.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.