Questions tagged [redirect]

Questions about HTTP redirects (status codes 301, 302, 303): How to set them up, why they are happening etc. For the catalog URL rewrite management in the admin panel, use the "url-rewrite" tag.

Filter by
Sorted by
Tagged with
22
votes
7answers
36k views

Redirect all http:// request to https://

Earlier i have posted this question : https://stackoverflow.com/questions/36104047/how-to-redirect-all-http-requests-to-https-on-magento but didn't get any reaction. Here is my site URL : www.trendy-...
18
votes
6answers
14k views

Magento 2 Custom Admin Action Redirected to Dashboard

I am taking the Magento 2 fundamentals development course and the Admin Router / Controller exercise seems out of date. The router does work, but the controller does not, it always just re-routes to ...
14
votes
1answer
5k views

Automatic 301 redirects for disabled products

I'm trying to add automatic redirects for a custom Product Type (Event) in Magento 1.7. When an event date has passed, I am marking the product as disabled so users don't go to the wrong page, and I ...
13
votes
7answers
37k views

Redirect controller in magento 2

I added a new custom tab in customer dashboard. If my custom form is successfully executed i need to redirect to customer main page customer/account. How can I do this?
11
votes
4answers
11k views

Redirect to URL with query string

In my module, after execution of my script, I need to make a redirect to a page with a query string in the URL. Here is what I have: $redirectUrl = 'http://magento.local/en_en/shop/index'; $...
9
votes
2answers
14k views

How to redirect to previous page in admin?

In my admin controller action I want to redirect to the previous page. How can I do this?
9
votes
7answers
6k views

Website start redirecting to another url

Maybe it's infected by some virus. My website starts redirecting to these infected URL. http://mon.setsu.xyz and some time https://tiphainemollard.us/index/?1371499155545 Infected links what I did ...
9
votes
1answer
434 views

Full Page Cache Infinite Redirect

Full-page cache is turned on (Magento EE ver 1.14.0.1). However, some products are having redirect loop upon hitting the URL. No error in the logs. If I clear the full_page_cache, then it would now ...
9
votes
1answer
1k views

Redirect to previous URL after admin login

I want admin users to be redirected to the url they opened after login. They should get links to a custom module page in the admin area, like https://magento.example/index.php/admin/...
8
votes
6answers
11k views

Magento2: redirection from Observer

We have already know that How to redirect from an Observer for magento 1.x version. but for magento 2,we does not know How to forcefully do redirection from an observer. I have done google ,but does ...
8
votes
10answers
30k views

Magento Redirects to Old Website regardless of what changes are made!

We are having the strangest Redirection problem on a Magento site. We copied the sites contents from another Magento site to a new URL. We have done this in the past with no problems but for some ...
8
votes
1answer
7k views

Magento2 redirecting to Shopping cart

Is there a way in Magento2 to have the user get redirected to shopping cart page after clicking "add to cart" - instead of the mini cart option at top of page?
8
votes
3answers
14k views

Disable redirect after product add to basket

When I add something from the category to the basket/cart it redirects me to the basket/cart. After searching I found that I could turn this functionality of in the admin system via Configuration &...
8
votes
5answers
15k views

Reasons for Magento redirecting to an install page

I have cloned a git repository containing a magento site in the same way as I normally do when joining a project. I went through the usual process of setting up database and setting everything up on ...
8
votes
2answers
5k views

Magento admin redirecting in loop

Magento Admin url keep on redirecting and shows the below error. This webpage has a redirect loop Frontend is working fine, but the problem is with the magento admin url. Also this problem occurs ...
7
votes
3answers
6k views

Magento 2: How to redirect customer to login page

How can I check customer is logged in or not? If customer is not logged in then how to redirect him to the login page? I want to do this from .phtml file. So please help me as per that.
7
votes
4answers
22k views

How to redirect a category to another link

I have an extension in my store that i can upload posts with this and it has a link in top menu that' name is blog. In menu I have a category that's name is News and I want to redirect it to blog. ...
7
votes
3answers
10k views

Onepage checkout: Already registered customer login redirects to create an account or login page

I have recently upgraded to 1.8.1 and am fairly new to magento. All other aspects of my site seems to be working just fine, however when a customer with an existing account adds item to the cart and ...
7
votes
4answers
858 views

I made a special store front for a mobile version of my site. How to redirect mobile devices there and also link back to the desktop site?

I've setup a special mobile store/store front under a subdomain - www.m.mydomain.com according to this tutorial. I was going to put this code in the Miscellaneous scripts to make the system detect ...
6
votes
3answers
17k views

How to redirect to the home page from a template?

I am in catalog\product\compare\list.phtml and I want to redirect to the homepage, like this: if($someThing) { // redirect to homepage $this->_redirect('home'); // --> doesnt work $...
6
votes
2answers
9k views

Redirect 'non www prefix to 'www' prefix still not working after disabling 'Auto-redirect to Base URL'

Magento install was redirecting all 'non-www' urls to the root home page. I found these questions on the same subject: Redirected to the Homepage when add www. in any URL Redirected to the Homepage ...
6
votes
2answers
4k views

Redirect www to non-www keeping the path

In my .htaccess, the redirect from "www.example.com" to "example.com" works. But when the urls is "www.example.com/someotherpath.html" the redirect is still "example.com" How to solve this? I am ...
6
votes
1answer
1k views

Magento 2: Where Does the Error Handler Redirect to the Home Page

Date: May 27th, 2015 (given the fast changing nature of Magento 2) For many classes of PHP errors/exceptions in Magento 2, the default system behavior is to redirect the user to the homepage, and ...
6
votes
2answers
244 views

Redirected automatically to a store view based on a user group (B2C & B2B) - M2

I have created two store views, one for B2C and one for B2B. I need that when a B2B customer login will be redirected automatically to the view created for their user group. But for B2C customers can ...
6
votes
3answers
268 views

Update: Magento 1 checkout account create redirect, SUPEE-10570v2 and Magento 1.9.3.9

We currently have a strange problem on our Magento 1.9.3.9 shop. When someone fills in the password fields in the checkout, to create an account. In that case when clicking the place order button on ...
6
votes
1answer
4k views

Magento admin URL redirecting to index.php/admin, resulting in redirect loop

If I enter URL https://server.com/admin It ends up redirecting to: https://server.com/index.php/admin and I end up with "This webpage has a redirect loop". a) Is this redirect url correct? ...
6
votes
1answer
1k views

Redirect in OnePage Checkout during checkout in “Shipping Method” to shipping provider's web (onepage)

I'm using OnePage module checkout. I created my shipping method module. If is my method selected, need to redirect to provider's web. Here customer choose closest place to his shipping address and ...
6
votes
0answers
3k views

Magento 2 with nginx throwing 404 error on setup

Can you please help me to solve the same problem.? I'm trying the magento 2 with nginx on my local environment. I'm getting a problem when trying to call my project for installation htttp://...
5
votes
1answer
2k views

Redirected to dashboard when something is wrong

I'm trying to build a Magento 2 module that has an admin section. But apparently I'm doing something wrong and when I click the admin menu link, I get redirected to the dashboard. I've seen this ...
5
votes
1answer
5k views

Redirect back to previous page only on successful login

I am trying to show catalog prices only to logged in users. Following snippet works however it has two issues: if(!Mage::helper('customer')->isLoggedIn()) { Mage::getSingleton('customer/session')-&...
5
votes
1answer
1k views

Magento 2: Trouble adding product to cart

Randomly, when I add something to cart from the product page, I am redirected to the cart page and told I have nothing in my cart. This doesn't happen consistently – if I refresh the cache (magento ...
5
votes
2answers
2k views

How to Remove Url Parameters and make english store as default [closed]

i have a website with 4 different stores, English (default), french, Italian, German. but the issue is when i had default settings in magento my urls contains that parameter "?___store=en" but i ...
4
votes
4answers
7k views

Programmatically 301 Redirect

How can I programmatically perform a 301 redirect in Magento?
4
votes
3answers
634 views

What type of redirect is this?

While i'm studying a line of code in magento vendor file I found this code $resultRedirect->setPath('*/*/'); What does this '*/*/' means and where does this redirects. I hope will get ...
4
votes
2answers
287 views

How to block cpanel link of my magento site

I had created an ecommerce website named http://example.com. I want to block my cpanel link for users who are accessing my website. Link is example.com/cpanel. If any I.T. specialist user or general ...
4
votes
3answers
687 views

Bind subdomain to a Magento Controller

I am working on an application for which I want to create few sub-domains in system, which will be served by Magento application. One example scenario can be creating separate sub-domains for system ...
4
votes
1answer
3k views

Multiple Checkout Payment Gateway Redirection Issue

I am using the payment gateway InnovatePayments which is working fine for single checkout & redirected me to Payment Gateway page after clicking place order button where i entered credit card info ...
4
votes
1answer
53 views

Product to category redirect

Is there a way to link/redirect a product page to a category? Scenario: I have 70-80 new products that all go into the same category. I can either chose to put one of the products in the "News" ...
4
votes
3answers
2k views

Add to cart redirect

How can redirect to a CMS page when the "add to cart button" (on a product view page) is clicked? I have already disabled the redirect to the cart page after the "add to cart" button is clicked. Now ...
4
votes
1answer
937 views

Magento 1: how to properly redirect from an admin controller observer?

Ok, so I want to do some validations when submitting the mass update product attributes. I've setup an observer like this: <adminhtml> <events> <...
4
votes
2answers
10k views

Multi store magento redirects to main store

I need to create create another store, I am following the instructions on the Wiki magento but I can not work. my problem is that when you enter the second store redirects me to the main store eg. ...
4
votes
1answer
2k views

Changing Product/Category URL_KEY doesn't create a 301 redirect ( EE 1.13)

I'm on EE 1.13.10 and I noticed that changing URL key for a product/category doesn't create a redirect from the previous URL to the new one, instead both URL still works. Any hint on out to debug/...
4
votes
2answers
38 views

Set module /blog as homepage

I am trying to set the AheadWorks blog module as homepage of Magento 2 for a site. So user gets directly to domain.com/blog instead of domain.com. Is it possible in the admin or Nginx somehow?
4
votes
1answer
4k views

Magento 2: How to redirect to checkout page after product added to cart via Observer/Plugin from category page?

I have followed below & it works fine Magento 2 : Add to Cart Button redirect to contact page Only issue it should be redirected after product is added to cart. I have tried different methods ...
4
votes
3answers
918 views

Have post-login redirect url survive creating new account

I figured this will be a helpful post (especially to me right now!) and I have not seen it after searching. First of all, we are using Magento 1.4 - so that may determine capabilities in this case. ...
4
votes
0answers
41 views

Magento 2 : There is Different Class for When User Logs Out Due to Inactivity

I need to redirect customer to a different URL when is logged out automaticly. I made a prefence for Magento\Customer\Controller\Account\Logout but it looks like, when the customer is logged out due ...
4
votes
2answers
2k views

How to send post data with redirect from magento 2 for a payment gateway?

we use magento2/app/code/Paymentgateway/Example/Controller/Standard/Redirect.php public function execute() { $order = $this->getOrder(); if ($order->getBillingAddress()) { $...
4
votes
1answer
1k views

Magento Redirect from Observer goes into Infinite Loop [duplicate]

My event code in config.xml <events> <controller_action_predispatch> <observers> <Test_Redirect_Model_Observer> <type>...
3
votes
4answers
20k views

Magento2 - After login redirect to previous page instead of My Account page

Is there a simple way to sovel redirect url customize in Magento? I'v searched some articles mentions "controller". But I have no idea about custom extensions. How to override the base controller ...
3
votes
1answer
7k views

Magento 2 - Redirect user to specific page after register

I write an observer to observe the customer_register_success event and run the following codes to do the redirect but failed. Can anyone help? $url = $this->url->getUrl('/'); $observer->...