Questions tagged [redirect-url]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
5 views

How to remove only sub-category from URL key Path in Magento 2?

I need only remove sub-category in URL key. I want to put only parent category in URL path Currently path is : http://localhost/noida-products/shop-by-category/criket-kit.html Require path is: ...
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
95 views

How to rewrite url with query string in magento 2

I want to rewrite url like: https://www.test.com/custom-parent-cat/sub-cat/10-12-14-17-19.html?cat=101 to https://www.test.com/custom-parent-cat/sub-cat.html Please help me to achieve this. Thanks
user avatar
1 vote
1 answer
31 views

$product->getProductUrl() returns URL without category prefix

I tried to enable the category prefix from admin STORES >> CONFIG >> CATALOG >> CATALOG >> SEARCH ENGINE OPTIMIZATION. It is working pretty well on the category page. I am ...
user avatar
0 votes
0 answers
23 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
56 views

How to check if controller is redirected?

I want to put some JS code when the customer is successfully registered. What I found is after register \Magento\Customer\Controller\Account\CreatePost redirect it to the account page. I tried \...
user avatar
  • 427
0 votes
0 answers
16 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
0 answers
51 views

magento 1.9 redirect to cart page

i am using magento 1.9 i have some products on home page and on category pages there is a button called "Buy Now" when user click on the button its make redirect to "Add cart" page,...
user avatar
0 votes
1 answer
66 views

how to redirect to external url from observer sales_order_place_after

I want to redirect to my external payment method after place order is Saved, I create an observer for event sales_order_place_after. Inside execute I put this code $this->responseFactory->create(...
user avatar
0 votes
1 answer
100 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
1 answer
28 views

Magento2 redirect Urls for contact us

Magento2 how can I redirect following contact URL to another contact-us/?id=104972 >> contact/
user avatar
  • 3,446
0 votes
2 answers
425 views

Magento 2.4 showing 404 not found for product page loadeds from a different store view

I have a Magento 2.4.1 store with two languages (EN and DE). Let's say the EN store view is currently selected and a product URL will look like this: https://website.de/wedding-bands/wedding-band-1....
user avatar
  • 33
1 vote
1 answer
1k views

"Not Visible Individually" products display on Frontend in Magento2.4

Is there any way to display "Not Visible Individually" products on frontend? My goal is admin can see product before upload in site...
user avatar
  • 835
0 votes
1 answer
50 views

Magento generates duplicate urls

I am new to Magento and I do not yet master the PHP language. (Magento ver. 1.9.4.2 I have a problem with the automatic generation of duplicate urls. I searched several forums but none of the ...
user avatar
0 votes
1 answer
16 views

problem redirection on product page when using http protocol

I got a problem in magento 1.6 In production environment, I pass a product url using http, it will be converted to https://domain/catalog/product/view/id/18341/category/451 instead of https://domain/...
user avatar
0 votes
0 answers
55 views

Magento 2 how to redirect backend controller to previous page?

I'm trying to redirect a controller that is executed in Order Detail. If I end the controller returning redirect like this, it throws an error: return $resultRedirect; If I end the controller with ...
user avatar
0 votes
1 answer
200 views

layout_generate_blocks_after observer is not redirecting to checkout/cart page in Magento 2

I'm using the observer layout_generate_blocks_after to perform redirection to an empty cart on a condition but it is not redirecting. Any help would be appreciated. Here is the piece of code which i ...
user avatar
  • 13
1 vote
2 answers
254 views

Magento 2 How to redirect to a custom block from a Controller

I have added a front phtml file followed by a Block, I need to redirect to that block from a controller. this is the Block path, it's working fine. http://mywebsite.co/schools/schoolzone_search/index/...
user avatar
1 vote
0 answers
147 views

Magento 2.4 - No route 404 page loading with product page issue

I redirecting 404 not found page to product page using controller_action_predispatch_cms_noroute_index event observer. Observer: $request = $observer->getData('request'); $request->initForward();...
user avatar
0 votes
1 answer
449 views

Multiple URLs getting created for single product

I am an SEO executive and pretty new to Magento. I have got a project in which there are multiple URLs for a single product and all URLs have been indexed on Google. Here is an example of URL ...
user avatar
2 votes
1 answer
693 views

How to redirect to specific category if product url is 404 due to product disabled in magento 2.3?

If I have disabled any product then it will redirect to 404. But I want to redirect that product url from 404 not found page to the category url in which this product is assigned. That means I want to ...
user avatar
  • 1,967
1 vote
0 answers
15 views

Magento 2 :How to write ategory URL rewrite

How to write 301 redirections to the category page Category URL key is "ballasts" request path : ballasts.html target path : catalog/category/view/id/10 When the user hit this URL directly ...
user avatar
  • 2,398
0 votes
1 answer
1k views

Magento 2 Change Url Key on new product save

How can I programmatically change URL-key on product save? I need url-key as a first brand and product name (/brand-productname)
user avatar
0 votes
1 answer
241 views

Redirect .html to none html on URL

I tried to remove .html from my categories from admin panel and it works. now I have example.com/test , but example.com/test.html is 404 now. how can I redirect all .html urls to non html one? should ...
user avatar
  • 701
0 votes
1 answer
249 views

Redirect customers to login page from home page in Magento 2

I want to redirect my store customers to custom login page when a customer visits my magento 2 store url. The customer could not access the site till he login to the store. How could I do that in ...
user avatar
0 votes
1 answer
214 views

For Magento2 how to apply a redirect rewrite in .htaccess file for all URL's from .html to /

For Magento2 how to apply a rewrite in .htaccess for all URL's from .html to / URL structure. The M1 store has .html as the end, the new M2 store has / as the URL ending for all products and ...
user avatar
  • 1,013
0 votes
1 answer
117 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/...
user avatar
  • 1,521
1 vote
1 answer
131 views

change url for store view

I have Magento 2.3.3 I created store views French, English, Turkish. I want to change url,. for example http://localhost:8080/magento/fr for French store http://localhost:8080/magento/...
user avatar
1 vote
2 answers
994 views

Wrong url redirection for product or category page Magento 2.2.3

I am using magento 2.2.3 for my store.I observed that some of my product page url goes wrong url or 404 ex. if i am try to open this url: https://baseurl/good-tee-hoodie-1-lb then it open like ...
user avatar
1 vote
0 answers
46 views

Magento 2 How to create and load custom route page

I want to add a custom redirect type 410 in URL redirect. I have added this in admin section and configured some pages with 410 redirect. Now I want to check the redirect type is 410 and if it is ...
user avatar
1 vote
0 answers
337 views

Mobile Menu category link is undefined URL can't working in Magento 2​

I'm facing some annoying issues. When I'm on the desktop, no problem with the menu link. When I'm on responsive, when I go through the menu, I have the right URL but when I click on category link the ...
user avatar
2 votes
1 answer
154 views

Need to redirect to given controller

I need to redirect to ('hello/Test/Customer') page but observer is not working. <?php namespace SimpleMagento\Custom\Observer; use Magento\Framework\Event\Observer; use Magento\Framework\Event\...
user avatar
1 vote
2 answers
1k views

Magento 2.3: Forward to another URL without redirecting

I'm writing a module that will accept any Magento URL with /discount/COUPON_CODE appended to the end, set the code in a cookie for later use, and then forward to the URL minus the discount part. So, ...
user avatar
1 vote
2 answers
564 views

Magento 2: URL Rewrite by custom router URL

I am using Magento version 2.2.6 I have already tried with Marketing >> URL Rewrite >> Add New URL Rewrite add custom URL but not working when we use it with question mark in URL, it's ...
user avatar
2 votes
0 answers
49 views

Magento2 custom referer URL redirects to correct URL but again redirects to My Account in few seconds

I have created a custom URL with referer like this: use Magento\Framework\UrlInterface; use Magento\Framework\View\Element\Template; public function __construct( Template\Context $context, ...
user avatar
0 votes
2 answers
2k views

Redirect all pages to homepage via .htaccess except backend

I've been trying to redirect all pages of my Magento website to homepage via .htaccess - except the backend, naturally. Currently, I'm using these rules and everything is working fine so far but I ...
user avatar
1 vote
2 answers
940 views

magento 2.3 redirect all product urls without category path to urls with category path

I want to redirect all product URLs without a category path to their category path URLs for SEO purposes. Example - Redirect mywebsite.com/product-name.html to mywebsite.com/category1/sub-...
user avatar
  • 377
0 votes
1 answer
31 views

UrlRewite one website to another?

Is it possible in magento to redirect existing site one page to another website? Like. http://magento-website/demo to http://magento-website-2/demo Without using htaccess and php header function. ...
user avatar
1 vote
3 answers
40 views

How to redirect page to cms page ie.(carrer.html) via controller file?

Mage::getSingleton('core/session')->addSuccess('Your inquiry was submitted and will be responded to as soon as possible. Thank you for contacting us.'); $this->_redirect('*/*/'); return;
user avatar
0 votes
0 answers
65 views

Magento2 problem with redirect. Page work without www but with www i've got "The page isn’t redirecting properly"

As in title when I enter to page http://example.com everything fine but when I type http://www.example.com I've got a message "The page isn’t redirecting properly". I try to change base_url and ...
user avatar
  • 33
0 votes
0 answers
222 views

redirection from payment gateway to website make empty cart

We are using Paytm extension in our client's website https://www.safaribags.com which builds on Magento 2.1 When customers click on "Pay with Paytm" button, the customer redirects to the Paytm Pay ...
user avatar
  • 15
2 votes
2 answers
126 views

Redirecting to different URL's after restoring the site on local

We have a development server to test our code changes before pushing them to live. Recently, we have restored the development server to local (xampp) for testing and also done the necessary changes to ...
user avatar
  • 1,124
1 vote
0 answers
137 views

Magento 2 new instance redirecting to staging site

I have my magento 2 staging site setup in folder staging and on url stagingexample.com , I have created a new folder newSetup in staging folder and setup copy of staging site in newSetup. I want to ...
user avatar
  • 377
3 votes
1 answer
246 views

Magento 2 View cart from abandoned cart email auto redirect to cart after login

I want to redirect customers to cart page once they login to the site from the abandoned cart email. There is a way to set redirect after login is successful but i want redirect to happen only when ...
user avatar
1 vote
1 answer
664 views

Redirect 301 removing parameters in URL by .htaccess

In the file .htaccess in magento, I want to redirect a url with parameters. An example is this: https://example.com/presente/decoracao/teu-sorriso?PageSpeed=noscript I need to redirect this to the ...
user avatar
0 votes
0 answers
57 views

Magento2 url issue

My magento2 website in following url to be show catalog/product/view/id/9583 but i need like powder-9583.html so what step we required to achieve this. and also search engine is on on ...
user avatar
2 votes
1 answer
44 views

Using getUrlPath in Magento 2.2.7 - URL Redirect

I have this script working on Magento 1.9 but can't figure out how to use it for Magento 2.2.7. <?php require_once 'app/Mage.php'; $sku = $_GET['sku']; $store = Mage::app()->getStore(); $path = ...
user avatar
  • 23
2 votes
2 answers
1k 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\...
user avatar
  • 1,729
3 votes
0 answers
48 views

404 in home page when open incognito Magento 1.9

I have an issue that I got 404 page when open the store in incognito mode but for the regular page in the browser it works fine because it is already cashed before. Also when I tried to open any ...
user avatar
4 votes
2 answers
3k views

Magento 2 : How to avoid 302 status code, actually Referrer URL returns 302 status code?

If anyone have idea please guide me, below is my code: <?php use Magento\Framework\App\Action\Action; use Magento\Framework\App\Action\Context; use Magento\Framework\Controller\...
user avatar