Holt DevOps News

In Magento, How to redirect all non www pages to www pages

News Categories: eCommerce SoftwareMagento

This article was published on: 04/1/21 5:08 PM

In Magento, How to redirect all non www pages to www pages

In Magento this is how to redirect all non www pages to www pages using the .htaccess with an FTP client like FileZilla.

Open up .htaccess to edit the file then do a find in file and look for #RewriteBase.

#RewriteBase /magento/ under this line paste the following but remember to change www.youwebsite.com with your own URL.

RewriteCond %{HTTP_HOST} !^www.youwebsite.com$ [NC]

RewriteRule ^(.*)$ http://www.youwebsite.com/$1 [L,R=301]

After this we tend to run the following command via SSH:

php -f shell/indexer.php reindexall

That’s it, we always recommend backing up your files before making any changes.

If you need any help with Magento please contact us for pricing.

Let's build a better web together

Get in touch with us for a quick quote

Web Development Agency, We Website Design

We’re eCommerce Experts in Cutting-edge Design & Development Technologies - Worldwide accreditation from leading digital platform providers including Shopify, WordPress & Magento.

Web Development Agency Manchester

Woolden Road
Manchester
M44 5JX


Web Development Agency London

71-75 Shelton Street
Covent Garden
London
WC2H 9JQ


Let's hook up

hello@wewebsitedesign.io

0161 676 8989

Stalk Us On Social

What We Do

  • Shopify
  • WordPress
  • Magento
  • SEO
  • Aero Commerce
  • Shopify 2.0

Copyright 2022 We Agency - White Label Web Development Digital Agency.
Registered in England & Wales We Agency is a trading division of We Website Design Ltd. Company Registration Number 14175442 Privacy Policy

Ready to work with us?

Drop us your details and we will arrange a social distanced meet & greet or video chat so you can see our beautiful faces.

    Name*

    Email*

    Telephone