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
4 answers
60 views

Redirect link for multiple store

I have a small problem and don't know how to implement redirect based on selected language (as a multiple store views there are few languages: en, lt,lv). The file located in app/design/frontend/...
Veronika Petkeviča's user avatar
1 vote
0 answers
56 views

Running magento and varnish in kubernetes

Our M2 store is in development and we are in the process of adding Varnish enterprise. Magento is installed in its own namespace in Kubernetes called m2-dev and varnish is in another namespace called ...
phil brady's user avatar
4 votes
1 answer
90 views

Critical Error of : file_exists(): open_basedir restriction in effect.in my Magento 2?

Here I explained the issue in detail: : file_exists(): open_basedir restriction in effect. File(/autoload.php) is not within the allowed path(s): (/var/www/:/tmp/) in /var/www/mywebsite.com/...
Jay Parmar's user avatar
0 votes
0 answers
36 views

Endless redirect when gad and gclid are added to the url?

Magento 1.9 As soon as those 2 Google parameters are added to any product URL of my shop, I am getting the "this website does not redirect properly" error. I tried disabling all caches and ...
user4095519's user avatar
1 vote
1 answer
102 views

Do a 301 redirect if there is no products in the current category

As a part of the SEO optimizations, when a customer go to a category page and if there is no products in the category, can we redirect it to a 301? Eg: As a part of -ve testing, if we load the ...
amesh's user avatar
  • 561
0 votes
0 answers
11 views

URL from Google Shopping not redirecting properly?

Magento 1.4 I have a product with URL https://www.whatever.de/something.htm. This can be opened normally. Now, when a customer clicks on that product in Google Shopping, Google adds something to the ...
user4095519's user avatar
0 votes
2 answers
128 views

when logout Why i have to wait 5 second to redirect to homepage?

Would someone explain me for this feature please ? I do ask GPT , it say "It is designed to prevent potential security vulnerabilities, such as session fixation attacks." "This delay ...
Phạm Hòa's user avatar
0 votes
1 answer
34 views

How to Add A link in the product page

I want a to add a link the customer can click which will redirect them to another page(a product) on the site. How can i achieve this? Ideally I'd like the link to be in the section where customer ...
rekilevin's user avatar
0 votes
1 answer
120 views

A technical problem with the server created an error. Try again to continue what you were doing. If the problem persists, try again later. Ajax call

I have a problem here. I use Ajax call to send data to controller. define([ 'jquery', 'Magento_Ui/js/form/components/button' ], function($, button){ 'use strict'; return button.extend(...
Nghia Hoang Trong's user avatar
0 votes
1 answer
37 views

Redirect 404 Pages to HomePage

I am redirecting 404 pages to the homepage, but the URL is not changing it's the same 404 page URL I want to change it to the homepage. My code : <?php namespace Vendor\Module\App\Router; class ...
Rana Zain's user avatar
  • 642
0 votes
0 answers
23 views

Redirect 404 Pages To the Homepage

We have disabled products, categories, and CMS. When we try to access the URL it redirects 404 page. I want to redirect 404 pages to the Homepage of the site.
Rana Zain's user avatar
  • 642
0 votes
0 answers
42 views

Really Weird Search Error

Elasticsearch 7, Magento 2.4.5 p1, running on a vps Centos7 WHM, test done with 3rd party search engines disabled. All caches cleared, and re-indexed. Also ran test with 3rd party search extension ...
UK_Rogue's user avatar
0 votes
1 answer
149 views

Magento Store Redirect Geo IP Address

Acutually I am redirecting the customers to the Specifc Store based on their geo IP Addresses. I applied Plugin and Observer also but the same result. Everthing is fine working, But it cachees I have ...
Rana Zain's user avatar
  • 642
0 votes
3 answers
595 views

Issue upgrading to Magento 2.4.6

I've recently upgraded my Magento version to 2.4.6. on my localhost. I installed it through Composer which indicates that everything has been successful. When I go to my local url, I get the browser ...
David Lightman's user avatar
0 votes
0 answers
136 views

How can I create redirects from old URL keys to new ones using a CSV import in Magento 2.3.5-p1?

I have updated the 'url_key' column in my Magento CSV file and imported it successfully. However, the old URLs are still returning a 404 error, even though the new URL keys have been updated correctly....
Aniket Singh's user avatar
0 votes
1 answer
93 views

How to use Klaviyo with PWA Studio?

I did the Klaviyo module setup in my Magento PWA Studio, it gave me all the backend functions, but I was missing the frontend JS scripts, I had to add them via Google Tag Manager. https://developers....
Rafael Corrêa Gomes's user avatar
0 votes
1 answer
134 views

Observer redirect to admin controller not working in https

here is the code: events.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:...
hkguile's user avatar
  • 2,221
1 vote
1 answer
80 views

307 redirect in Magento 2

How could I implement in Magento 2 a http 307 redirect. I would like if possible use Magento methods/framework not phps. Thank you.
Simse's user avatar
  • 35
1 vote
1 answer
65 views

How to created a admin module to redirect to specific controller when admin user login

app/code/Vendor/Redirect/ ├── Controller │ └── Adminhtml │ └── Login │ └── Redirect.php ├── etc │ └── adminhtml │ └── routes.xml └── registration.php registration.php <?...
hkguile's user avatar
  • 2,221
0 votes
0 answers
35 views

Redirect to login page with exception

I using the following code to redirect all visitors to the login page. Everything is working fine with the exception of the Forgotten Password link... how would be make an exception for that /customer/...
acctman's user avatar
  • 111
3 votes
1 answer
112 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
1 vote
1 answer
43 views

Load magento via .htaccess RewriteRule

I've a very specific problem with magento. At first let me explain what the problem is. I load magento into an iFrame to integrate the store into a webpage. This works like charm until it comes to ...
Jeireff's user avatar
  • 11
2 votes
2 answers
56 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
0 votes
2 answers
495 views

Magento 2 How create front controller with a specific path?

I want create controller for specific path, but i can't know how i can do this. My controller must work with path like: site.com/usa/some-review/dynamicParam My path for controller: site.com/some-...
David Young's user avatar
2 votes
3 answers
1k 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
  • 157
0 votes
3 answers
305 views

Magento 2 - How to redirect customer to specific URL after login with loginById?

I need to redirect the customer to a certain URL from a observer after I log him in with loginById. How can I redirect?
Black's user avatar
  • 3,280
0 votes
1 answer
97 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
JewelryNest's user avatar
1 vote
1 answer
2k 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
  • 440
0 votes
1 answer
324 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 ...
Bhavesh Prajapati's user avatar
0 votes
1 answer
363 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 ...
Mohd Farhan Bin Ramli's user avatar
0 votes
1 answer
22 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 ...
n00bly's user avatar
  • 623
1 vote
1 answer
501 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 ...
Black's user avatar
  • 3,280
1 vote
0 answers
81 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
0 votes
1 answer
71 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 ...
MGPM's user avatar
  • 741
0 votes
1 answer
395 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 ...
krishna's user avatar
  • 41
0 votes
1 answer
1k 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-...
Tj1997's user avatar
  • 47
0 votes
0 answers
29 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
Jack Brooks's user avatar
0 votes
1 answer
228 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 ...
Prits's user avatar
  • 626
0 votes
0 answers
183 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 ...
Prasad Pingle's user avatar
0 votes
1 answer
870 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.
Prits's user avatar
  • 626
0 votes
3 answers
986 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 ...
Black's user avatar
  • 3,280
0 votes
1 answer
521 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; ...
fudu's user avatar
  • 1,268
0 votes
1 answer
406 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 ...
Claims's user avatar
  • 1,146
0 votes
1 answer
224 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....
Vibhore Jain's user avatar
1 vote
0 answers
50 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
0 votes
1 answer
110 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 ...
Ramesh KR's user avatar
  • 866
0 votes
1 answer
456 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(){ $...
Oscar Vazquez's user avatar
0 votes
1 answer
656 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 ...
web master's user avatar
0 votes
1 answer
52 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/...
Vibhore Jain's user avatar
0 votes
1 answer
261 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-...
Vibhore Jain's user avatar

1
2 3 4 5
15