People who code: we want your input. Take the Survey

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
3answers
23 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 ...
0
votes
1answer
19 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; ...
0
votes
1answer
25 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 ...
0
votes
1answer
29 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....
0
votes
0answers
15 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://...
0
votes
0answers
13 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 ...
0
votes
1answer
23 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 ...
0
votes
1answer
23 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(){ $...
0
votes
1answer
14 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 ...
0
votes
0answers
21 views

How to redirect user to Cart page after “Add to Cart”?

I have made a custom .phtml file to show "Add to Cart" button where I call/use the .phtml file in a CMS page. Below is my code: <?php $sku = $block->getData('product-sku'); $...
0
votes
1answer
21 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/...
0
votes
1answer
16 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-...
1
vote
1answer
28 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 ...
0
votes
1answer
42 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. ...
0
votes
2answers
23 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 ...
0
votes
1answer
19 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" /> </...
0
votes
2answers
26 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 ...
0
votes
1answer
18 views

Magento 2 redirect back with message from controller, redirecting working fine but error message not showing

Messages do not appear after redirection. Tried many solutions but no luck. Here is the code I tried. I have created a fronted form with custom routing with URL params. public function execute(){ ...
0
votes
0answers
16 views

Redirect url with key formula in Magento 2

I'm trying to do this in Magento 2: I have my url : https://www.example.com/page/ I'd like to add after /page a key value. Example : /page/key1, /page/key2 ... Then I get the key value with $this->...
0
votes
1answer
24 views

How to add 301 Redirect pages in magento 2?

I want to add 301 redirects to these URLs - 1-> From www.abc.com/blog To www.abc.com/blog/ 2-> From www.abc.com/contact To www.abc.com/contact/ 3-> From www.abc.com/catalogsearch/advanced To ...
0
votes
1answer
24 views

Magento 2 If ascoited product qty are out stock, so configrabale how to disable?

We were used Magento 2.3.5 version. Question: associated product qty are out of stock, so configurable product how to disable or redirect 302 pages? Thanks in advanced.
0
votes
1answer
35 views

How can I restrict SPECIFIC CMS pages from being seen by non logged in customers?

I found solutions for redirecting non logged in users to the login page for all CMS pages, but I only want to restrict a few CMS pages. How can I specify which pages to restrict? My code right now: ......
0
votes
0answers
22 views

How to fix 404 error in Magento 2 without coding

I've deleted some old/discontinued products off the site, and this obviously gives rise to some 404s. How do I redirect these to a category page from the back end of Magento 2. Not a coder so can only ...
0
votes
0answers
54 views

Redirect to /downloadable/customer/products after successful checkout automatically | Magento 2.4.1 CE

Cause we only sell downloadable products in our Magento 2.4.1 CE with Autoinvoice we would like to redirect our costumers automatically to the /downloadable/customer/products/ instead of the /checkout/...
0
votes
0answers
70 views

Magento 2: Google search index issue URL is not available to Google - Redirect error

I have installed the GeoIP Store Switcher module. When I enter my site's internal URL for example- xyz.com/women/tops It redirects me to the specific store page which is fine but it shows the error in ...
0
votes
1answer
11 views

this error“ Err_TOO_Many_Redirect” path is admin/noroute/denide?

this erro happend when user role change to denied.and whenwver you loggin to admin page it is redirect many times error.
0
votes
0answers
11 views

Mageto 2.3.4: What causes only a few category pages on the development site to redirect to the live?

We have a dev site which we use for testing any feature before it is deployed on the live server. A couple of category pages are found to redirect to the category pages on the live site. What causes ...
0
votes
0answers
15 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
45 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
35 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
13 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
99 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
25 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
22 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
19 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
122 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
8 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
19 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
17 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
13 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
203 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
171 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
264 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
26 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
82 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
26 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
217 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 ...

1
2 3 4 5
15