0

is there any way for redirecting magento home page on a external link using magento admin url rewrite functionality. What I tried so far you can see in picture.

enter image description here

Update:- My question was never related to what are the other option to do this. My question was related to Magento url rewrite like home page redirection to external website is possible or not.

  • Good question. Have you tried if empty request path is possible? Normally the request path entry in Magento redirects should not end with a slash. And I see another problem, it's Target Path that means, you can only place a path component in tthere (not fully true, it can be path, query, fragment but only by error), you can not place an absolute URI in there. so no start with https?:// or ://. – hakre Jul 29 '15 at 19:23
2

I would use htaccess Redirect instead.

1.open notepad

2.place this code

Redirect 301 /old-url http://www.newurl.com

3.save as .htaccess and place it on the root where your index page is.

How to redirect webpages code generator can be found here: http://www.htaccessredirect.net

  • i want to do from admin, not from server side. I know about server redirection. – Saurabh Jul 29 '15 at 19:05
  • @Saurabh: What is wrong with configuring this on the level of the webserver? I think Vvvaida raises a good point in her answer. – hakre Jul 29 '15 at 19:25
  • @hakre: I already know about server configuration but I am curious about magento if is this possible from admin? – Saurabh Jul 30 '15 at 4:32
  • @Saurabh: The only way I'm aware of in the admin for that is by setting the base-URL to the URL you want to redirect to. But then the redirect is of code 302 and not 301. An not only from the homepage (but only to the homepage/base-URL). – hakre Jul 30 '15 at 7:09
-1

You cannot do a redirect from your site to external url using Url Rewrite.

Url rewrite only do redirection into you instance.

You configure will do like redirection:

YourSite/ -> YourSiteUrl/http://redesign.goori.com

Better way do htaccess redirection.

In this case,you can use event&Observer by

controller_action_postdispatch_cms_index_index

because this event call whenever call home and

Use for redirection to 3rd party site

Mage::app()->getFrontController()->getResponse()->setRedirect($url)->sendResponse(); 
  • it is possible from admin panel, it is working for category page, there is just problem with home page. Even if I access home page with myurl/home then Magento url rewrite work. for that case :- request path :- home and Target Path :- external url – Saurabh Jul 30 '15 at 4:40
  • Hi @Amit Bera, I used observer for url rewrite, the issue I'm facing here s, - when i enter the existing url(www.example.com/faq) in the request path and route's the same in browser it's reaching the correct external target url(www.google.com). (Working) - when I enter the new url(www.example.com/test) in the request path and route's the same in browser it's not reaching the correct external target url rather gives the 404 page. (not working) I'm using the grid and saving the dates in db. Can you suggest me the solution!!! – Vigna S Jun 22 '17 at 4:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.