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
0 votes
0 answers
10 views

Have a plugin (interceptor) run once per session

So, I have this plugin for our project (drop-shipping marketplace), which redirects vendors without signed contracts to the contract signing page. The thing is, as it is, it infinitely redirects ...
user avatar
0 votes
1 answer
11 views

how to solve temporary redirect in magento 2.4.3

I am the owner of the jewelry site when I run a Site audit from Semrush I get 944 temporary redirects, and I do not know how to solve temporary redirects in Magento 2.4.3 Please help
user avatar
0 votes
1 answer
45 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 ...
user avatar
0 votes
0 answers
35 views

Magento 2 URL redirect Duplicate Content

I have a website with one store and several store views on Nginx (Magento Commerce Cloud). I am using store codes in the URL. Unfortunately, when the pages are called without store code in the URL, it ...
user avatar
0 votes
0 answers
20 views

Err_too_many_redirects when setting session storage to redis

I'm trying to use redis as session storage on Magento 2.3.3. In my app/etc/env.php file I have: 'session' => [ 'save' => 'redis', 'redis' => [ 'host' => '127.0.0.1', 'port' =&...
user avatar
0 votes
1 answer
15 views

Magento 2 all product and category request is redirect to http://baseurl/20us%20search%20us%20search%20us%20search?amnoroute

I have set up my live project in a docker environment using this. https://github.com/bhaveshpp/magento-docker-server/ All thing working perfect but when I search for the product it will redirect my ...
user avatar
0 votes
0 answers
9 views

Magento domain name redirect issue

There appears to be some redirect in place on my website which is going to: https://www.myexample.com/www.myexample.com Which results in a 404 page. I know this as a large amount of traffic is being ...
user avatar
0 votes
0 answers
14 views

Problem with store code to urls

I have a problem with store codes to url's after configuroetion store code do not work with base url. It's work on other subpages but when i try go to main i got Allowed memory size of 2097152 bytes ...
user avatar
0 votes
1 answer
26 views

Get Page Type Of Referer Url In Magento 2

I am using Magento 2.3.5-p2 I am trying to get the page type for previous link I am able to get the previous link using \Magento\Framework\App\Response\RedirectInterface $redirect, public function ...
user avatar
0 votes
0 answers
12 views

Does Magento keep short URL live when Use Categories Path for Product URLs is YES?

We have set our store to be Use Categories Path for Product URLs: Yes - in m2.4 And so the product pages, are www.mydomain.com/category/sub-category/my-product But if I remove category and sub-...
user avatar
0 votes
0 answers
101 views

How to prevent session data losing on success redirect?

I'm working on Magento 2 upgrade from 2.2.9 to 2.4.3 and I'm having an issue with an on-line payment. Here is the deal, after payment the following callback executes public function execute() { ...
user avatar
0 votes
1 answer
17 views

M2 - redirect only links coming from Google

We have a new webshop that already has some good indexed links in Google. But the links (from an old Magento) contain a .html extension. So I wanted to redirect them all to the non .html URL (using ...
user avatar
  • 573
0 votes
1 answer
59 views

Magento 2 - New storeview redirects back to default store view - status code 302

I created a new storeview accessible under the URL app.example.com I added this to the .htaccess to set the MAGE_RUN_CODE Environment Variable to app if the URL app.example.com is called: SetEnv ...
user avatar
  • 2,380
0 votes
0 answers
24 views

Cache issue with multiple store

I have multiple stores for Magento 2 site and use the Amasty GeoIP extension for IP redirection. My IP is excluded for redirection. The multistore is based on site, not storeview, and uses URL like ...
user avatar
  • 1
1 vote
0 answers
21 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 ...
user avatar
0 votes
0 answers
15 views

Incorrect redirects 302 from category/pages to homepage - Magento

Sometimes after clicking on a search result in Google, but also in URL on other websites/google docs etc., the user is redirected (using a 302 redirect) to the home page, not to the appropriate ...
user avatar
0 votes
0 answers
20 views

.htaccess 301 redirect doesn't work

Anyone got an idea why the following .htaccess code doesn't do the redirects on my Magento 2.4 website? Redirect 301 /idealcheckout/payment /index.php/idealcheckout/payment Redirect 301 /idealcheckout/...
user avatar
  • 11
0 votes
0 answers
34 views

URL Rewrites After Akeneo Import on Magento 2.3

Currently my catalog has product URLs that are based on the SKU. I have created SEO friendly URLs which I have imported into Akeneo. I am finding when I import the new URL key it does not create a 301 ...
user avatar
0 votes
0 answers
24 views

Redirect issue with multistore shop

I have a Magento 2 website with multistore, i got redirect issues using this tool https://www.seobility.net/en/redirectcheck/ https://www.domain.com The page does not redirect correctly. Incorrect ...
user avatar
0 votes
0 answers
11 views

Regex Condition for rewriting category from html to non-html

I want to redirect all my .html Categories to non.html. Like this. www.server.com/category/subcategory.html -> www.server.com/category/subcategory/ Its working fine with this line: RedirectMatch ...
user avatar
  • 91
0 votes
0 answers
31 views

Session expired after checkout process and system can not redirect to thank you page

after input OPT for checkout product. it's a redirect to this page and the session expired
user avatar
0 votes
1 answer
28 views

magento2.4 customer login

My Magento 2.4 Customer login redirects to customer login again and not login. also my list page doesn't show any product I Use all commands like reindex but not show and I need to solve these two ...
user avatar
  • 691
0 votes
1 answer
74 views

Magento 2 Check if error then redirect to custom url

I am using create post plugin. But the issue with this is, I want to redirect it to a custom URL if an error occurred in createPost() default to execute the function. For example, if a customer with ...
user avatar
  • 21
0 votes
0 answers
9 views

Magento account connexion redirection

When we try to access the URL customer/account the customer is redirected 302 to a new /connexion URL. I want to change that redirection to 301. So I tried to make an observer triggered with event ...
user avatar
  • 727
0 votes
0 answers
34 views

Magento 2 site keeps redirecting to old site

I am having issues with a Magento 2 store that keeps redirecting to the old url. I have changed the secure and unsecure base urls in core_config_data and changed the secure and unsecure base urls in ...
user avatar
0 votes
0 answers
20 views

Magical login redirection

I've go an issue with login I can't figure it out, hope you might come with an idea. On my development environment and in my preprod environment, everything is working fine. I enter my credentials, ...
user avatar
  • 727
0 votes
1 answer
244 views

Magento 2: How to use redirect in Router.php

I am trying to redirect a cms page to a custom controller. in router.php I can check the current URL, If the current URL is as an example if it matches /test-url i want to do a redirect to /test-url-...
user avatar
  • 45
0 votes
0 answers
13 views

Can you do custom routing for cms page?

Can you change the url from cms page to a custom url? Is that something we could do with routes and show the cms page content
user avatar
0 votes
1 answer
56 views

How to stop user login in Magento 2?

I want to stop user login in Magento 2 for some customers. So I created a back-end setting for customers to be blocked by the website and successfully get it done. But on the front end part, it is not ...
user avatar
  • 526
0 votes
0 answers
94 views

redirect to pdp from product tile in cart magento 2

Redirect to PDP I want to redirect to product detail page, whenever I click on the product CTA or tile in the cart.
user avatar
  • 1
0 votes
0 answers
49 views

Magento website not accessible in browser via VPN (Apache logs shows http 302 status)

I have deployed the magento website using bitnami magento stack on Azure platform. Also for security I have included this in VPN and connect to the server(SSH) via VPN client. Even after all magento ...
user avatar
0 votes
0 answers
13 views

how to redirect sales_order_place_before event on checkout page on redirect?

I have used sales_order_place_before event in Magento 2 but on error it goes to cart page but i want it goes to checkout page first step. My observer code is : if(in_array($curruseradd, $fulladdress)){...
user avatar
  • 526
0 votes
0 answers
9 views

Too many redirecting in project page in magento.com

In my magento account, I tried to enter the project page but I can't enter because of too many redirects.
user avatar
0 votes
1 answer
147 views

How to redirect Product Detail page to Home Page or 404 in Magento 2?

How to redirect Product Detail Page to 404 or Home Page in Magento 2.4. I don't want user to see product detail page in my store. Any help is appreciated. Thanks.
user avatar
  • 526
0 votes
3 answers
68 views

Magento 2 - How to add redirect link to login link?

I created a new CMS site newsletter-abo and placed a text on it which shows this: Please login to access this site. The word "login" points to /customer/account/login. If the customer ...
user avatar
  • 2,380
0 votes
1 answer
41 views

Magento 2: Redirect with Data in Observer

I have this code to redirect to custom page from observer. But I wonder how to redirect from observer, and with data transfer to the redirected page. <?php namespace Namespace\Module\Observer; ...
user avatar
  • 1,168
0 votes
1 answer
68 views

Redirect 302 into 301

in our magento application we have somehow a 302 redirect from /customer/account into /connexion. I would like to change it into a 301 one. No idea how to process this. This seems to be handled in a ...
user avatar
  • 727
0 votes
1 answer
79 views

I have newly installed magento 2.4.1 in my localhost(ubuntu), but the problem is that I cannot see the URL admin panel login screen

My general customer view frontend is working fine. But when I tried to login into the admin area , then I enter this in address of chrome web browser - http://127.0.0.1/local_m241/lcl_m241/index....
user avatar
0 votes
0 answers
84 views

Redirecting to cart after product added to cart

Magento 2.3.5 Having some trouble getting a module I've been working on to redirect to cart after altering the cart contents. As you'll see below I started with Gaiterjones's BuyXGetY module (https://...
user avatar
1 vote
0 answers
23 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 ...
user avatar
  • 11
0 votes
1 answer
32 views

Magento 2 custom dashboard Page

I want to show a completely custom dashboard. I have a controller for that. I just want to show this page when Admin login. I don't want to show the default Magento dashboard controller I want my ...
user avatar
  • 828
0 votes
1 answer
156 views

Magento 2 how to redirect to checkout on ajax submit?

I'm trying to redirect a form to checkout after clicking ajax submit request. I'm able to reach the controller, but I can't redirect to checkout. Here is my code: public function execute(){ $...
user avatar
0 votes
1 answer
146 views

Redirect to login page triggering even after customer logs in

I have a CMS page with content that can only be seen by logged in users. I have an if statement that checks $this->_sessionFactory->create()->isLoggedIn(); and if they're not logged in, this ...
user avatar
0 votes
1 answer
27 views

I found this file /vendor/magento/module-customer/Controller/Account/LoginPost.php file is having some code. What is the explanation of below code?

I want to know what actually these two lines of code are doing. $redirectUrl = $this->accountRedirect->getRedirectCookie(); if (!$this->getScopeConfig()->getValue('customer/...
user avatar
0 votes
1 answer
44 views

Suppose I reach to this page customer/account/login/, after I click on "Sign In" button and i found referer feature not working :(

How to echo or print the referer url(history page) from where I reached to that login page. I have to implement something that after login user should not reach to dashboard instead he should re-...
user avatar
2 votes
1 answer
88 views

What does resultRedirectFactory?

I found a code at /vendor/magento/module-customer/Controller/Account/Login.php /** @var Redirect $resultRedirect */ $resultRedirect = $this->resultRedirectFactory->create(); I want to know ...
user avatar
0 votes
1 answer
187 views

Error redirected you too many times upon trying to install Magento 2.4

I just downloaded latest version of Magento 2.4 and I am trying to install it on Namecheap hosting but upon entering the URL of my website in the browser to start the setup wizard, it keep re-loading. ...
user avatar
0 votes
2 answers
52 views

Mirror my Magento 2 website on one domain

Here is one request on me for a Magento 2 website. The boss here wants to make the following. He have a Magento 2 web store with 3500 products and lot of orders per day. Cause sometimes the website is ...
user avatar
0 votes
1 answer
27 views

Get target url in layout before observer

I'm inside an observer <event name="layout_load_before"> <observer name="add_robot" instance="FranceTombale\Robot\Observer\NoindexfollowOnProduct" /> </...
user avatar
  • 727
0 votes
2 answers
66 views

How to redirect domain.com to www.domain.com?

I have this code in .htaccess Options +SymLinksIfOwnerMatch RewriteEngine on RewriteCond %{HTTP_HOST} ^domain.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L] But it still appears ...
user avatar
  • 1

1
2 3 4 5
15