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
0answers
9 views

Magento 2 how to disable or add form key to adminhtml controller?

How can I add a form key to my controller? it's redirecting me to dashboard everything it finishes. this is my code use Magento\Backend\App\Action; use Magento\Framework\App\RequestInterface; use ...
0
votes
0answers
9 views

Magento 2 Uncaught Error: Call to a member function isLoggedIn() on null

I'm trying to change the order status on Order Detail with a custom controller, but I'm getting this error Uncaught Error: Call to a member function isLoggedIn() on null This is my code: <?php ...
0
votes
0answers
6 views

Redirect header from API endpoint

I am trying to setup an API endpoint my mobile app can use to redirect to Google Play or Apple App Store depending on the device making the request. I have php code that was working stand alone and ...
0
votes
3answers
29 views

Magento 2.3 Site Unwanted Redirect

My Magento 2.3 site is redirecting and I am unsure why. When I access the domain, it redirects to domain.com/Industrial%20Cleaning%20Products. I have done the following to try and rectify the issue: ...
0
votes
0answers
12 views

Magento 2 - Redirect to last page after login for custom login form

I created a custom login form in the header. If you click on the icon then the form shows. However, if I login in this form, then the user is getting redirected to the customer dashboard, after he ...
0
votes
3answers
90 views

In Magento 2 after ajax success can't redirect page in admin

After ajax success can't redirect page in admin in Magento 2 var redirectUrl = "<?php echo $block->getBaseUrl().'admin/trackorder/shipinfo' ?>"; $.ajax({ url: urlLabel, ...
0
votes
0answers
24 views

Show custom message after redirect in M2

I want to show error message in order view page when user click on Credit Memo link using before plugin. I have redirect to order view page as showing in this link when user click on Credit Memo link....
0
votes
0answers
17 views

Magento 2 customer is always redirected back to /checkout/cart/

We have some customers gettign in touch stating that whenever they go to www.domain.com/checkout they are just redirected back to www.domain.com/checkout/cart page. Has anyone else had this issue ...
0
votes
0answers
18 views

Customers being redirected to checkout after login

Title says it all. After a customer logs in, it redirects them to checkout. What could be causing that? I have a plugin that does login for pricing, but this happens even when I disable it. The option ...
0
votes
0answers
15 views

Redirect to CMS page url If anything after the url

I have a URL of CMS page like https://example.com/test-page. Now I want to redirect every request to the same URL If anything written after that URL. For Example: If https://example.com/test-page/list/...
0
votes
1answer
23 views

Cart and Checkout redirecting to 404

I just updated to Magento 2.4, and I can't access my cart or checkout anymore. I see 500 errors, and a redirect to /noroute, bunt I can't figure out what's causing it. Any way I can track this down ...
0
votes
0answers
7 views

Installing magento2 ina subdirectory give me eternal loops in the admin

How can I have magento2 in a subdirectory in a reseller with cpanel. I have the domain pointing public_html but my magento instance have to be in public_html/src I put the following code in the ....
0
votes
0answers
16 views

Magento 2: How get setted URL

I have question, for example, we have some redirect: class toto extends \Magento\Framework\App\Action\Action { protected $_resultPageFactory; protected $_resulFactory; public function ...
0
votes
1answer
15 views

Magento 2 admin controller is not working

Here am added a admin controller, here is my code etc/adminhtml/routes.xml <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
1answer
15 views

Magento 2 Frontend Page shows Try clearing your cookies

I have installed magento through command line by using bin/magento setup:install --base-url=http://127.0.0.1/magento2/ --db-host=localhost --db-name=magento --db-user=magento --db-password=magento --...
0
votes
0answers
8 views

simple redirects using Marketing > URL REWRITES not working properly

Sometimes when people click on a search result that has a broken URL like https://www.example.com/catalogsearch/result/ or https://www.example.com/catalogsearch/result/?q= they will get taken to a 404 ...
0
votes
0answers
65 views

Magento2 How to redirect category url to external link?

I have a requirement wherein I need to redirect multiple categories to external site's respective category pages. For the same I have created categories in magento. Whenever we create a category in ...
1
vote
2answers
110 views

Magento: How to redirect to a phtml page from a controller?

I have a controller and from there I want to redirect to a custom phtml file. My controller path is app/code/Softadroit/Prescription/Controller/index/Save.php The phtml file is stored in app/code/...
0
votes
1answer
93 views

Redirects using routes.yaml in the root folder .magento/routes.yaml

Can anybody for the love of god help me with the syntax here. I feel like i've tried everything and everytime i try to push this to the magento cloud it complains about something or another. Here's my ...
0
votes
0answers
21 views

I get redirected to https://www.hugedomains.com/domain_profile.cfm?d=magtest&e=com

I just installed magento on my localhost but when I try to access it for the first time with localhost/magento/admin i get redirected to that page.
0
votes
1answer
54 views

Magento 2 Custom MassAction redirects to dashboard with “Invalid Security Token” but works?

I created a custom mass action, and it shows up and seems to function fine except rather than redirecting back to the order page, it goes to the admin dashboard and says the typical "Invalid ...
1
vote
1answer
21 views

How to redirect (& show flash message) on CMS contact page when wrong captcha submitted

I have added a Contact form in a CMS Contact page. added Layout Update XML section added vendor/magento/module-contact/views/frontend/templates/contact.phtml vendor/magento/module-contact/controller/...
1
vote
2answers
80 views

Getting error “ Type Error occurred when creating object ”

When i edit in constructor file of my custom module it give me this error " Type Error occurred when creating object " i don't know what i am doing wrong i use same code for creating a Block ...
0
votes
2answers
39 views

How to run Magento 2.3 on several domain aliases, but using only one website (and one storeview)

I need to create many different magento 2.3 shops as subdomains of the main shop www.domain.com; eg shop1.domain.com, shop2.domain.com, shop3.domain.com, shop3.domain.com All those subshops will share ...
0
votes
1answer
25 views

How to configure the 500 error page in magento 2

Is there a way to set up a custom 500 page error in magento 2? I tried to add a 500.phtml file in the pub/errors/default directory but this method only works with 404 errors and maintenance error 503. ...
1
vote
0answers
34 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 ...
0
votes
0answers
9 views

Magento 2 : Redirect customer to login page on email change

i want to redirect the customer to the login page when email id is changed from edit form ,i did below code Issues : 1: I am not getting redirected to login page, i can see message **Please Login now*...
2
votes
1answer
47 views

Can you redirect CMS page to custom frontend route magento 2.3.5

I am trying to redirect a cms page to a new route which I have created for frontend. I am not sure if we can redirect to the new custom module route frontend with a config in admin area. My aim is I ...
0
votes
3answers
130 views

How to redirect a request in Magento from custom Module controller?

I have a third-party module installed in my Magento ver 2.3.4-p2 instance. I need to put a redirect from a file in the module, which is present in app/code/Plazathemes/Blog/Controller/Router.php ...
0
votes
0answers
34 views

Magento 2.3.x CE Payment Gateway Interface Redirects to External PSP Window/Endpoint

I'm a newbie in Magento, currently trying to customise/create new payment gateway interface for a CE version 2.3.x setup. I've tried referring to the devdocs, used the famous Sample module project as ...
0
votes
0answers
61 views

Magento 2.3 - List getProductUrl redirect with dubble slash // sign after domain

For some reason our Magento 2.3.5 store redirects the product url on the category list page, that we load using the default code <?= /* @escapeNotVerified */ $_product->getProductUrl() ?>, to ...
0
votes
1answer
43 views

Can I allow specific URL of default Magento2 Frontend and restrict all other Frontend URLs?

Our Magento frontend is in vue storefront, so we have restricted default Magento frontend URLs for our system. But I need one URL of frontend which is http://127.0.0.1/index.php/customer/account/...
0
votes
0answers
62 views

Problem with redirects using similar ulr on routes.yaml

On my routes.yaml file a I have something like this: The problem is that when I go to the page: www.mysite.com/white-product/0064/product-test It redirects me to www.mysite.com/product/color-white....
0
votes
0answers
10 views

On M2, how do you apply a redirect of all URLs for .html to /

On M2, how do you apply a redirect of all URLs for .html to / ? We have migrated from M1 to M2. The M1 store had .html as the end of products and categories. The M2 store just has / at the end of ...
0
votes
0answers
12 views

Based on the country navigate to Store in magento2

If a UK customer navigate example.us should be redirected to UK store If a UK customer login example.us should be redirected to UK store If a UK customer register US should be redirected to UK ...
0
votes
0answers
56 views

Magento 2 - Redirect to checkout or last visited page before login or account creation

I'm working on a plugin that when the Customer logins or creates an account It redirects to Checkout page If there is any product on cart, If the cart is empty I want to redirect to last visited page (...
0
votes
0answers
14 views

Magento Admin redirects to homepage after login

i configured the magento backend. But now it redirects me to the homepage after successful login. When i type the backend url again, it also directly puts me to the front end. I did clear all cache, ...
0
votes
0answers
17 views

Redirect product when Out of Stock

In one of my categories there is a lot products that are out of stock. I want to redirect the products that are out of stock to the category page without Filter By mark Ex: website/product1 -> ...
0
votes
2answers
61 views

Redirect customers to login page after new account is created

When a new customer registers an account on our site, the registration page simply refreshes and clears the password field, making it look like registration has failed, when in fact it has succeeded. ...
0
votes
1answer
19 views

redirect to same page after changing store front+ magento2

When I go a product page and change the store(english,danish) etc , it if redirecting to homepage of that store. I need to be in the same page. Could anyone help me in this.
0
votes
0answers
99 views

Invalid Form key.Please refresh the page

If I visit my website first time it give me an error of Invalid form key.Please try again lator. It is giving same error while add product in the cart and it directs the page to the Home page in ...
0
votes
1answer
21 views

I am unable to login to site and the admin e.g.example.com/admin due to ERR_TOO_MANY_REDIRECTS error

I am unable to login to site and admin in my website e.g. example.com/admin due to ERR_TOO_MANY_REDIRECTS error. This page isn’t working example.com redirected you too many times. Try ...
0
votes
4answers
52 views

How to implement a redirect to a custom success page after submitting a form on a custom page (similar functionality like checkout)

I have a submission form and a controller, with the execute method. At the moment, after sending the form, my page reloads and on top of the page I get an alert that notifies the user about the ...
0
votes
0answers
22 views

Magento 2.1.2: Url add directory names and returns 404 not found page

I have migrated my magento store from local to server and then i have changed core_config_data path to https://example.com/ and i ran all the commands like upgrade,deploy and other cleaned cache. But ...
1
vote
1answer
346 views

Magento 2 varnish Checkout to cart Redirect Problem

Preconditions 1.Magento 2.3.4 2.Must Varnish Enable Steps to reproduce 1)Do not add any product to the cart. 2)Directly go to https://www.sample.domain/checkout/ 3)Because No product in cart ...
0
votes
2answers
32 views

Error too many redirects after set developer mode

I have this error after set developer mode in Magento 2. I have tried to deploy static content, clean cache, flush cache, etc... Any idea?
0
votes
1answer
96 views

Magento 2 Webhook

Can someone help me with this issue, i'm using Braintree webhook, which is sending post data to my Magento 2 controller route, but from some reason, it always redirects me to home page, giving me 302 ...
0
votes
0answers
21 views

Magento 2 multi website not getting redirected properly

My Magento 2 is having multiple websites. Can anyone tell me what code to write in .htacess file to show redirection to the proper website? When I hit url1 of website 1 it redirects properly. but ...
0
votes
0answers
78 views

Custom module Controller/Action redirect to external domain does not work with admin secret key

I need to be able to redirect the user to an external domain for a Magento 2 module I'm building. I've tried to do this in two ways. In My class I have: use Magento\Backend\App\Action; use Magento\...
0
votes
0answers
28 views

How to redirect from email to a particular stores in Magento 2?

My website have 2 store, English and Arabic. I send forget password email from Arabic store but when i click in email then it redirecting to English store instead of Arabic. Can anyone help me how ...

1
2 3 4 5
14