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.

206 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6
votes
0answers
3k 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://...
4
votes
0answers
40 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 ...
4
votes
2answers
2k 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()) { $...
3
votes
1answer
37 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 ...
3
votes
1answer
30 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 ...
3
votes
1answer
127 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] == ...
3
votes
0answers
400 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 = []; ...
3
votes
0answers
869 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\...
3
votes
1answer
447 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 ...
3
votes
1answer
1k 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). ...
3
votes
0answers
64 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 ...
2
votes
0answers
34 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 ...
2
votes
1answer
214 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\...
2
votes
1answer
20 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 ...
2
votes
0answers
923 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 ...
2
votes
0answers
419 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 ...
2
votes
1answer
348 views

Magento 2 admin catalog category page isn't redirecting properly

I'm migrating a website from Magento 1.9.0.1 to 2.2, I've only migrated data, that's all I need, the migration completed sucessfully, all the products, customers, orders, categories are there, all ...
2
votes
0answers
397 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. ...
2
votes
0answers
154 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=...
2
votes
1answer
67 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 ...
2
votes
0answers
60 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. ...
2
votes
2answers
434 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()) ...
2
votes
1answer
950 views

Admin Not Redirecting After Login

When running 1.7.x if we tried to open a link in to the admin section but we weren't logged in, we could login and it would automatically bring us to the page we had first tried to access. After ...
2
votes
1answer
673 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 ...
2
votes
1answer
35 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 ...
2
votes
1answer
901 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.
1
vote
0answers
23 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/...
1
vote
2answers
24 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) { $...
1
vote
0answers
49 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 ...
1
vote
1answer
27 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 ) ...
1
vote
0answers
26 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. ...
1
vote
0answers
8 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 ...
1
vote
1answer
122 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\...
1
vote
0answers
17 views

Magento 2.1.8 dev site catalog search and products listing redirecting to live site

I have setup my magento 2.1.8 EE live site on staging for development. The homepage, admin and cms pages are working fine. But my prduct pages are redirecting to live site and catalog search also ...
1
vote
0answers
26 views

Redirect home page with example.com// in magento 2

Hello I just Moved My Website and I am getting Error in home page page is not redirect properly Home page is open with 2 slash www.example.com//
1
vote
0answers
59 views

Magento 2 - how do i redirect “mydomain/pub” and “mydomain/pub/media” path to homepage?

I'm trying to redirect "mydomain.com/pub" and "www.mydomain.com/pub/media" to homepage (mydomain.com). Currently, "mydomain.com/pub" path shows the homepage with no css and js loaded, and "www....
1
vote
0answers
89 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 ...
1
vote
1answer
147 views

Magento 2: Can I response with a redirect on REST API?

I have an API endpoint that expects a GET request. On some scenarios, I want to be able to perform a redirect instead of responding with a result. e.g., If you'll open the API endpoint URL in a ...
1
vote
0answers
21 views

admin url redirects to customer view page in magento2.3

I am a beginner to magento. I am currently using magento version 2.3 and http://localhost/myproject/admin url redirects to customer view page instead of appearance of admin login form. Thank you in ...
1
vote
0answers
24 views

External URL post redirect without intermediate page (white page) in Magento 1.9.x

Is there any possibility from the shop-system to perform a post redirection while clicking on the 'Place Order' button? We have tried posting the form data using the function getOrderPlaceRedirectUrl ...
1
vote
1answer
163 views

skip function execution using before plugin

I'm overriding the controller Magento\User\Controller\Adminhtml\User\Validate::execute() using before-plugin so I can perform some checks before magento validate using this function. If certain ...
1
vote
0answers
129 views

Magento 2: Redirect to backend customer list from frontend

I'm trying to create a menu to redirect to the client list in the backend. The menu is: <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="...
1
vote
0answers
23 views

Are the Magento 2.1.14 rewrite rules in htaccess file working properly?

In the default htaccess file in Magento 2.1 there are some RewriteCond's and RewriteRule's that are explained in the htaccess.sample file that comes with Magento 2.1. never rewrite for existing files,...
1
vote
0answers
207 views

Magento 2: Order Success Page Not Loading for custom payment method

I am using Webkul Ccavenue extension for Magento 2.1.4. On successful payment, a success response is sent to Magento, after which it should redirect to order success page(checkout/onepage/success), ...
1
vote
1answer
320 views

plugin to stop redirecting to cart from checkout

In M2 if the user tries to go to the checkout without any items in their cart the Magento\Checkout\Controller\Index\Index::execute() function redirects them to the cart. if (!$quote->hasItems() || ...
1
vote
1answer
835 views

Magento2 redirect to Product Details Page on add to cart

I have disabled the Ajax cart. When clicking on addtocart it is redirecting to product page, correct I expect this to be like this. but my problem is all the products in the store have custom ...
1
vote
0answers
32 views

Magento Skip HTTPs redirect

I am using following code RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI} !^/healthy-library # First rewrite to HTTPS: # Don't put www. here. If it is already there it will be included, if not #...
1
vote
1answer
96 views

Redirecting customers to different pages based on customer group

I have been asked how much work this would be to do, I assume I would need to edit the AccountController.php But before I even start I am wondering if anyone knows first if possible and second how ...
1
vote
0answers
407 views

Magento 2 Constructor returns Fatal error: Uncaught TypeError. How to resolve?

<?php namespace Module\Name\Controller\Index; class Myclass extends \Magento\Framework\App\Action\Action { protected $formKey; protected $cart; protected $product; public function ...
1
vote
1answer
78 views

How to redirect users to custom link when user access any link?

I implemented OTP integration. Now in table 'otpp' I have column 'verified'='0' when user doesn't verify OTP and 'verified'='1' if user verified. So I need to redirect to otp verification page when '...