As of May 31, 2023, we have updated our Code of Conduct.

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.

253 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6 votes
0 answers
5k 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://...
Rithin Prabhakar's user avatar
4 votes
0 answers
51 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 ...
Gianni Di Falco's user avatar
4 votes
2 answers
3k 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()) { $...
Ayush Mittal's user avatar
3 votes
1 answer
368 views

Magento 2 - Clean SEO URL with attribute

We run Magento 2 - 2.1.6 Question: If I create a link based on layered navigation attributes (storeurl: /clothes?cat=1029&gender=124) for example. We get a lot of errors regarding Google Search ...
Paul Kuijten's user avatar
3 votes
1 answer
177 views

How to show success messages on magento 2x home page externally redirect url?

In Magento 2.x form use in <iframe src="forms.netsuite.com "> after submitting from netsuite return/redirect to home-page-url/?whence= I need to show success message in home page: <div ...
matinict's user avatar
  • 1,492
3 votes
1 answer
324 views

Magento 2: It does not redirect me correctly

I have different store views, one with code 'en' (this works) and one with code 'es_es' (this does not work and redirects me to the home). This is the condition that redirects: if ($result[0] == ...
chdzma's user avatar
  • 951
3 votes
0 answers
682 views

Magento 2 customer session setAfterAuthUrl() failed to set redirect URL

I have created custom module for custom blog wishlist. So I have set authentication while trying to save blog into wishlist as below Controller >> save.php public function execute() { $data = []; ...
Ronak Chauhan's user avatar
3 votes
0 answers
2k views

Magento 2: Same Event with Multiple Observer in Different Module causes redirection issue

Magento 2: Same Event with Multiple Observer in Different Module causes redirection issue To solve: Magento 2: Can we call one observer in another observer? I have followed below code magento\app\...
Jackson's user avatar
  • 9,749
3 votes
1 answer
518 views

How to log 404 or undefined url's path information in magento?

I want to log all urls which redirects to 404, for this I extended Mage_Cms_IndexController's noRoute action, here I can log all urls by Mage::log(Mage::helper('core/url')->getCurrentUrl()); Now ...
Mansoor Khan's user avatar
3 votes
1 answer
2k views

Modifying the redirect after editing a product in the cart

I have a problem modifying a redirect in magento CE 1.9.2. Let's say a customer has a configurable product in the cart, and would like to edit that product (ie. changing color or size or something). ...
Simon Strandman's user avatar
3 votes
0 answers
71 views

Google craws errors of links that don't, and Never existed

In the last couple of days I'm having trouble with Googlebot crawlers. I've experienced an increased of 404 links that don't exist, and have never existed. Trying to see the origin of these 404 ...
nhm's user avatar
  • 31
2 votes
1 answer
78 views

Magento 1 How to redirect on current page

I want to redirect to the current page and display a success message but it's redirecting to the home page. Any solution is available? Thank you
DhwaniBhatt's user avatar
2 votes
1 answer
157 views

Redirect subdomain with nginx

I have some subdomain from the old site like 123.abc.com and I want to redirect them to abc.com/123. I have installed magento 2.3.2 and nginx as webserver.
user avatar
2 votes
0 answers
287 views

Configurable product will not redirect to product view page after click on add to cart

if a customer forgets to choose the product option of the configurable product on the product listing page and click "add to cart" it is redirecting you to the product view page with the message: "You ...
Sagar Parikh's user avatar
2 votes
0 answers
32 views

Magento 2.2.6 Product Pages Not Opening after upgrade

The product detail pages on my site are no longer opening after upgrading from magento 2.2 to 2.2.6 There are no error rather a catalog search results page is loading instead http://mydomain.co.uk/...
jt9489's user avatar
  • 155
2 votes
0 answers
58 views

www.domain.com/pub/ shows the web page without css/javascript loaded

I can access my site correctly like www.domain.com ( with all the content loads correctly), but if I type in www.domain.com/pub/ it is still accessible ( without js & css loaded). How do I fix ...
Mage Explorer's user avatar
2 votes
2 answers
2k views

Redirect issue after add to cart in magento2 custom controller

I am calling my custom controller for adding the product through the form action. Below is my controller file. <?php namespace {Vendor}\{Module}\Controller\Product; use Magento\...
jafar pinjar's user avatar
  • 1,839
2 votes
0 answers
300 views

Failed Payment Redirect in Magento 2

When a customer has an order canceled due to their credit card being declined it seems all extensions redirect customers back to the cart page and not the actual payment page in the checkout. Is this ...
Goose84's user avatar
  • 2,529
2 votes
1 answer
2k views

Magento2 redirect to Product Details Page on add to cart

I have disabled the Ajax cart. When clicking on addtocart, it is redirected to a product page, correct I expect this to be like this. My problem is, All products have custom options. But the Home page ...
Joshi's user avatar
  • 347
2 votes
1 answer
24 views

When i click save and send test email it's redirecting to frontend

When i click save and send test email it's redirecting to frontendbaseurl/awfollowupemail_rules/edit/id/16/tab/followupemail_tabs_sendtest/key/f58025911cd3cb18f5d6683ab609c608/ but need to redirect ...
Nagendra Kodi's user avatar
2 votes
0 answers
1k views

Store Switcher redirect default store

I am having a problem with store switcher. I created two stores: English store and Arabic store When I switch the store English into Arabic, it redirects me to default English store. Here is my URL ...
Faizan's user avatar
  • 61
2 votes
0 answers
590 views

Magento 2 website redirecting constantly

I installed my new Magento2 page on the domain yesterday but I keep get an error that I cannot manage to solve. Where am I making a mistake. The page isn’t redirecting properly Firefox has ...
Axel Dekker's user avatar
2 votes
0 answers
507 views

Redirect to different store view according to IP Magento 2.1.9

I have a 2 website in 1 installation with 2 store views each. The store views are GBP and USA and the difference is just the price. I have manage to redirect each website properly using .htaccess. ...
vbak's user avatar
  • 762
2 votes
0 answers
177 views

redirect htaccess from lowercase letters to uppercase magento using .htaccess

redirect htaccess lowercase to uppercase after http://example.com/catalogsearch/result/?q= From: http://example.com/catalogsearch/result/?q=apple To: http://example.com/catalogsearch/result/?q=...
Nagendra Kodi's user avatar
2 votes
1 answer
74 views

Some of url are redirected to https

I have install ssl on my site , Everything works fine on https but I want to use secure urls only for checkout and registration area pages. For that I have set base url to http://mydomain and Use ...
mansi's user avatar
  • 411
2 votes
0 answers
65 views

Magento 2.0 - Multiple Simple Products redirecting to the same Configurable product in different Categories

I am not sure the best and cleanest way to do this, preferable from the admin panel. However, I sell different sports products with different teams. Right now, each team has it's own product page. ...
teamtrav's user avatar
2 votes
0 answers
836 views

Unable to refresh the page after generating PDF file in order grid

We have kept one button in mass action in orders grid, upon clicking it should generate a PDF file, which is working fine, but after generating PDF the should refresh automatically. That's we are ...
Soeb Safi's user avatar
  • 313
2 votes
2 answers
596 views

ajax Customer register how to continue the process?

In my custom controller I am checking if customer is logged in or not.If not redirects to customer login page . public function customaddAction() { if(!Mage::helper('customer')->isLoggedIn()) ...
coder's user avatar
  • 639
2 votes
1 answer
1k views

Admin Not Redirecting After Login

When running 1.7.x if we tried to open a link into the admin section but we weren't logged in, we could log in and it would automatically bring us to the page we had first tried to access. After ...
Jonathan's user avatar
  • 163
2 votes
1 answer
862 views

Getting id_path or request_path or target_path of current category or product page

I have many store views. I need to be able to retrieve id_path or request_path or target_path of current category or product page, so that I could retrieve target_path of the same category or product ...
tmm's user avatar
  • 359
2 votes
1 answer
41 views

admin panel not log in magento?

When I enter a wrong email/password, it says: Invalid User Name or Password. error. But correct email, password does not show any error and also does not redirect to dashboard. How do I resolve ...
manokarthick karthick's user avatar
2 votes
1 answer
1k views

Magento 2.0 Add to wish list without redirect to wish list?

How to add a product to the wish list without triggering a redirect to the wish list? I have tried many times. Please suggest the code for me, my theme is default LUMA.
AOBAMA's user avatar
  • 21
1 vote
2 answers
32 views

Weird 301 redirect for the entire site

I've made a copy of a Magento folder to set up another domain, swapped the old domain name both in the database (web secure url) and in the filesystem (env.php), and pretty much everywhere I could ...
Захар Joe's user avatar
1 vote
2 answers
725 views

Magento 2 - Redirect base url to base url with store code

In Magento 2 I have two stores with "add store code in url" option enable. Store code 1 = "fr" Store code 2 = "es" I want to automatically add default store code in url: ...
Fbr's user avatar
  • 147
1 vote
1 answer
1k views

Magento 2: Multi-website redirects to main domain

I have a multistore in Magento 2. The main website URL is mainwebsite.ca. The second store runs through a subdirectory 'secondwebsite' and is accessed through the URL: mainwebsite.ca/secondwebsite/. I ...
mechanic's user avatar
  • 340
1 vote
0 answers
72 views

Ajax popup redirects to home page after clicking on "add to cart"

When the add to cart button is clicked, the page is redirected to the home page, and I would like to stay on the current page. I have tried different ways but couldn't accomplish it or getting an ...
Иван Димитров's user avatar
1 vote
0 answers
46 views

Redirect root page to specific store (language) view

We setup a Magento 2 Shop with 3 languages: Www.domain.com/de_ch/ Www.domain.com/fr_ch/ Www.domain.com/en_ch/ Where de_ch is the default language. The problem now is, that we get duplicate content for ...
Ab_lu's user avatar
  • 11
1 vote
1 answer
298 views

Magento 2 Mobile Menu - 2nd level redirect issue

The Magento 2 mobile menu is already fully expanded by default revealing all categories and subcategories which is a huge problem if you have a very deep menu structure. I have been able to make it ...
Jason's user avatar
  • 11
1 vote
1 answer
400 views

Store switcher url is not redirecting to the store

I'm working on store switcher in magento 2.3.3 I get the url but url is not redirecting to the particular store again get back to the same store http://test.de/test_de/stores/store/switch/?SID=...
venkata prasad's user avatar
1 vote
0 answers
28 views

Checkout redirects to checkout again after purchase - no order created

Magento 2.2.3 Whenever I buy something in my store, I am being redirected to the checkout again, just as if I did not press the "buy now" button. The cart is still filled, no order is created. I ...
Arnie's user avatar
  • 932
1 vote
2 answers
373 views

Cannot redirect to a specific page using Observer events such as sales_order_place_before, and checkout_submit_before in Magento 2.3

I am currently implementing a behavior where I will check the quote items in cart, then check if it contains my custom attributes. If true, then it will redirect me to a specific page(CMS) page. This ...
Eubie Aluad's user avatar
1 vote
2 answers
703 views

Magento 2: How redirect from controller to another controller to POST method?

I am trying to redirect the customer when their store view is not correct. When I redirect the _request method it is GET and I need it to be POST if ($currentStore !== $customerStore) { $...
chdzma's user avatar
  • 951
1 vote
0 answers
41 views

Magento 2.2: Redirect to category page after add to cart

I am trying to redirect to the product category page, the process enters through the getCategoryUrl function but has never just redirected to the category. I have tried many functions and none is ...
chdzma's user avatar
  • 951
1 vote
0 answers
59 views

Infinite loop search page

While accessing the search url (http://localhost/mage2/catalogsearch/result/ or http://localhost/mage2/catalogsearch/result/index) infinite loop. Is it possible redirect to home page? Thanks.
Rat's user avatar
  • 834
1 vote
0 answers
340 views

Magento 2 some urls redirected to specific store view

I have 2 websites and three store views set up in my mangento 2 : domain.nl domain.be domain.be/fr/ I dont know for some reason, some urls in front-end and back-end get redirected to domain.be/fr/. ...
EshaRamady's user avatar
1 vote
0 answers
197 views

Redirect to cart page after place order success (Magento CE 2.3.1)

I am facing this issue too on Magento CE 2.3.1. I have put the log everywhere since the issue happened. I can see if using a payment method (currently using Cybersource SecureAcceptance) which will ...
phucnguyen.sw's user avatar
1 vote
1 answer
987 views

Nginx redirect for -only- homepage of old domain, to homepage of new domain

On the server.rewrites file within the nginx/ map, I have the following logic for redirecting the homepage of an old domain, to the homepage of a new domain: if ($http_host ~ ^(www\.)?olddomain.com ) ...
Julian Murillo's user avatar
1 vote
0 answers
126 views

301 redirect loop on category view

when I try to access a category page, I get the error ERR_TOO_MANY_REDIRECTS caused by 301 redirects. Also trying by not rewritten url (like "catalog/category/view/id/309"), the result is the same. ...
alx.r89's user avatar
  • 11
1 vote
0 answers
89 views

How to parse session url from one store to another in Magento 1.9?

I have two stores. Store A - Showing products as a catalog, unable to buy. Store B - Able to buy for exclusive customers with a given login account. That I want to do is, create a button on store A ...
Juvita. dk's user avatar
1 vote
1 answer
949 views

How to redirect customer on custom page after registration in Magento 2

Here is my code customerregistersuceessobserver.php <?php namespace Webkul\Marketplace\Observer\Rewrite; use Webkul\Marketplace\Observer\CustomerRegisterSuccessObserver; use Magento\...
prabhakaran7's user avatar
  • 1,057

1
2 3 4 5 6