https://www.icyphoenix.com/viewtopic.php?f=35&t=5238&p=35497#p35497
-----------------------------------
alephlg
Thu 08 Jan, 2009 23:59

Re: HOWTO Migrate Drupal 6.4 To Icy Phoenix 1.2.0.27c
-----------------------------------
Convert Drupal's  SEO links to Icy Phoenix's links:
[code linenumbers=false]SELECT u1.dst, 

CASE substring_index(u1.src, '/', -1) WHEN 'feed' THEN
	CASE substring_index(u2.src, '/', 1) 
		WHEN 'node' THEN 'rss.php'
		WHEN 'user' THEN 'rss.php'
		WHEN 'blog' THEN 'rss.php'
		WHEN 'forum' THEN concat('rss.php?f=', substring_index(u2.src, '/', -1))
		WHEN 'taxonomy' THEN 'rss.php'
		WHEN 'tagadelic' THEN 'rss.php'
		WHEN 'contact' THEN 'rss.php'
		ELSE 'rss.php' END
WHEN 'track' THEN concat('search.php?search_author=',
					substring_index(u2.dst, '/', 1))
ELSE
	CASE substring_index(u2.src, '/', 1) 
		WHEN 'node' THEN concat(u1.dst, '-vt', 
			substring_index(u2.src, '/', -1), '.html')
		WHEN 'user' THEN concat('profile.php?mode=viewprofile&u=',
					substring_index(u2.src, '/', -1))
		WHEN 'blog' THEN concat(u1.dst, '-vt', 
					substring_index(u2.src, '/', -1), '.html')
		WHEN 'forum' THEN concat(u1.dst, '-vf', 
			substring_index(u2.src, '/', -1), '.html')
		WHEN 'taxonomy' THEN 'index.php'
		WHEN 'tagadelic' THEN 'kb.php'
		WHEN 'contact' THEN 'contact_us.php'
		ELSE 'index.php'
	END 
END AS url

 FROM www_mandrivalinux_hu.url_alias u1 
    left join www_mandrivalinux_hu.url_alias u2 
           ON u1.src = concat(u2.src, '/feed') 
               OR u1.src = u2.src where  substring_index(u1.src, '/', -1) != 'feed';[/code]

Export the resolution to csv file and edit like stream:

[code linenumbers=false]cat resolution.csv | sed 's/^"/RewriteRule ^/g' | sed 's/","/$ /g' | sed 's/"//g' > old-drupal-link.include[/code]

...and include this file to vhost file or insert the .htaccess file [b]after[/b] [i]RewriteEngine On[/i] line.


