Pacifik Posted May 19, 2015 Report Share Posted May 19, 2015 (edited) Здравствуйте, уважаемые знатоки Столкнулся с проблемой.Решили вынести одну категорию товаров в отдельное направление, соответственно сделали отдельный сайт, и перенесли все товары одной категории туда. Теперь на старом сайте, категория /cat1 должна быть переадресована на новый сайт, на главную страницу new-domain.ru Делаю Redirect 301 /cat1 http://new-domain.ru/ или RedirectPermanent /cat1 http://new-domain.ru/ Результат Error 404 http://new-domain.ru/?module=ProductsView&category=cat1 Помогите решить вопрос, за ранее огромное спасибо ) Edited May 19, 2015 by Pacifik Quote Link to post Share on other sites
Kosjak76 Posted May 19, 2015 Report Share Posted May 19, 2015 А почему Redirect 301 /cat1 http://new-domain.ru/ А не Redirect 301 catalog/cat1 http://new-domain.ru/ У вас точно Симпла? Quote Link to post Share on other sites
Kors Posted May 19, 2015 Report Share Posted May 19, 2015 Попробуйте свою строку вставлять в .htaccess ближе к началу файла... Quote Link to post Share on other sites
Pacifik Posted May 19, 2015 Author Report Share Posted May 19, 2015 (edited) А почему Redirect 301 /cat1 http://new-domain.ru/ А не Redirect 301 catalog/cat1 http://new-domain.ru/ У вас точно Симпла?Это пример, естественно я пишу полный относительный путь. Да, точно симпала ) Edited May 19, 2015 by Pacifik Quote Link to post Share on other sites
Pacifik Posted May 19, 2015 Author Report Share Posted May 19, 2015 Попробуйте свою строку вставлять в .htaccess ближе к началу файла...Да и так в самом начале стоит, куда уж выше ) Quote Link to post Share on other sites
yr4ik Posted May 19, 2015 Report Share Posted May 19, 2015 Слеша в урл нет? Попробуйте так: RewriteRule ^catalog/mycat/?$ http://site.ru/xxxxxx [L,R=301] Quote Link to post Share on other sites
Pacifik Posted May 19, 2015 Author Report Share Posted May 19, 2015 (edited) Слеша в урл нет? Попробуйте так: RewriteRule ^catalog/mycat/?$ http://site.ru/xxxxxx [L,R=301] Так сработало RewriteRule ^catalog/mycat?$ http://site.ru/ [L,R=301] Edited May 19, 2015 by Pacifik Quote Link to post Share on other sites
yr4ik Posted May 19, 2015 Report Share Posted May 19, 2015 слеш поставить нужно! Или убрать "?"Поскольку в данном регулярном выражении ? означает что идущий перед ним символ может не присутствовать... и код: RewriteRule ^catalog/mycat?$ http://site.ru/ [L,R=301] сработает при урл "http:/сайт/catalog/myca" Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.