aurelou Posted July 14, 2015 Share Posted July 14, 2015 Hi all, I want to make a few 301 redirects because I want to change structure of categories. The problem is that I have Ultimate SEO URLs. So when I make for exemple this redirection in .htaccess : RedirectPermanent /test-c-42_120.html http://www.mysite.com/new-c-130.html It redirects to : http://www.mysite.com/new-c-130.html?cPath=42_120 With the cPath of my old category at the end of the URL. So it doesn't work... How can I do ? Thank you very much. Link to comment Share on other sites More sharing options...
aurelou Posted July 14, 2015 Author Share Posted July 14, 2015 It's OK I solved it. 1. In general.php, REPLACE the line function tep_redirect($url) { with this one : function tep_redirect($url,$type='') { 2. Before the line header('Location: ' . $url) add this line : if($type=='301') header("Status: 301 Moved Permanently"); 3. In index.php under <head> add : <?Php if ((int) $current_category_id == '42') //Replace with your old ID category { tep_redirect(tep_href_link("xxx-c-40.html"),'301'); //Replace with the new URL } ?> That's all. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.