cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.3: add 301 redirects

Magento 2.3: add 301 redirects

I have added 301 redirection in .htaccess file but it is not working in magento 2.3.

 

Here is my .htaccess code:

# For 404s and 403s that aren't handled by the application, show plain 404 response
ErrorDocument 404 /pub/errors/404.php
ErrorDocument 403 /pub/errors/404.php


Redirect 301 /products https://www.example.com/brickwebb.html

any solution?

3 REPLIES 3

Re: Magento 2.3: add 301 redirects

@PankajS_Magento 

This must not be Magento issue. Are you on Apache or Nginx? Did you clear browser cache or tried different browser to test the same?

 

Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.

- Tarandeep
Problem solved?Please give 'Kudos' and accept 'Answer as Solution'.

Re: Magento 2.3: add 301 redirects

You could try using Magento URL Rewrites rather than .htaccess if there are not too many redirects needed, here's the documentation on the feature: https://docs.magento.com/m2/ce/user_guide/marketing/url-rewrite.html 

Re: Magento 2.3: add 301 redirects

Hello @PankajS_Magento 

 

You can refer "How to Redirect 301 using Htaccess in Magento" for the solution that works for Magento 2.3 as well!

 

Hope it is helpful.

---
If you've found my answer useful, please give"Kudos" and "Accept as Solution"