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.

This is an epic footer, don't you think?

We’re Hardcore Experts in Cutting-edge Design & Development Technologies - Worldwide accreditation from leading digital platform providers

Web Development Agency Manchester

The Barn
Woolden Road
M44 5JX

Stalk Us On Social

Web Development Agency London

71-75 Shelton Street
Covent Garden

Let's hook up


0161 676 8989

Copyright 2021 Holt DevOps Ltd - White Label Web Development Digital Agency | 13127888 Registered in England and Wales | 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.