Redirecting Custom URL to Home in Magento using URL Rewrites

Sometimes, you might need to redirect some custom URLs to home page of your Magento store. Let’s say, you used to own a website where there were a number of URLs (products, categories or static pages) and you have recently migrated to Magento, but you don’t have same pages or URLs anymore but you don’t want the users to land on a 404 page when they open a link that you previously shared on social media, etc. Instead, you can make them land on the home page of your store.

Magento has in-built feature of redirecting and rewriting URLs which I guess you are already familiar with. If not, you may refer to this Magento Documentation.

If you need to redirect an URL to home, you just need to set Target Path to ../ and set Redirect Type to Permanent (301). Refer the image below:

5 Must Have Extensions for Your Magento 2 E-Commerce Store

Magento 2 is already very feature-rich. But, in terms of running a successful E-Commerce store, you might need to have some more features in your store for better user experience. The best must-have Magento 2 extensions on your Magento eCommerce Store in 2019 now in one place, no need to search a lot on google. 

Here, we will list the best Magento 2 extensions which one every Magento eCommerce website needs. All extensions listed here are tested and fully compatible with Magento version 2. The most important things of Best 5 Magento 2 Must have Extensions are Free and Paid with high-quality extensions and reliable vendors in the Magento 2 marketplace.

Since the launch of Magento 2, several vendors have been developing and launching numerous Magento extensions. Some are free, some are paid. To help you get started, we present you our rundown of the best 5 must-have extensions for your Magento 2 store. The following list will help expand your e-commerce store’s functionality and attract new customers as well.

Magento 2 Out of Stock Notification

You don’t need to lose a client on the off chance that one of your store’s items is out of stock. Using this module, customers can subscribe to out-of-stock items. When you’re prepared to offer that item, a notification can be triggered to the customer. It can be done in both ways, automatic and manual.

GeoIP Store and Currency Switcher

If you offer your products in multiple languages or currencies, then this extension can be found very useful. You can configure the extension so that it can detect the frontend user’s location and then can automatically switch language/store based on the configuration done from the Admin panel.

Store Credit Extension for Magento 2.x

Magento 2 Store Credit extension by xMagestore is a powerful tool to increase customer loyalty and motivate customers. Store Credit extension significantly supports e-commerce stores to encourage customers’ purchases by awarding them credit amount which is automatically added to their account balance.

Twilio SMS Extension for Magento 2.x

You might need to send order updates via text message, or might need to verify the phone number of customer, in that case, this extension can be very useful. It uses Twilio API services, so to use this module, you will need to have an account on Twilio.

Alternatively, you can use some other extensions, if you want to use any other API service provider:

Text Local

SEO Suite Ultimate Extension for Magento 2

SEO Suite Ultimate is a full-featured SEO solution that covers a full range of on-page SEO activities: from optimizing small page elements to building a well-thought site architecture.


We sincerely hope that you found our list of the must-have extensions for your Magento 2 e-commerce store helpful and educative. As you can see, there are numerous ways to fine-tune your store, reach more customers, and provide a pleasant shopping experience.

Remove index.php from Magento Store URL

In this blog, we will see how to remove index.php from base URL of a Magento store.

↣ To remove “index.php” from the web-site URL, the mod_rewrite module should be enabled on your server.

In case, mod_rewrite is not enabled, follow these steps:

  • Run this command sudo a2enmod rewrite
  • Edit your httpd configuration and write following lines

  • Now, restart apache service using this command (the commands might change based on the OS that you use)
    sudo service apache2 restart

You need to following these steps:

  1. Log in to your Magento store admin and go to the Store ⇒ Configuration section. (In case of Magento 1, it’s System  Configuration)
  2. Then click on the Web tab in the leftside menu.
  3. Expand the Search Engines Optimization tab and set the Use Web Server Rewrites option to Yes.
    Search Engines Optimization
  4. Then, go to the Base URLs (Secure) tab and set the Use Secure URLs on Storefront option to Yes, too. Click on the Save Config button.
    Base URLs (Secure) ⇒ Use Secure URLs on Storefront
  5. Make sure your Secure and Unsecure base urls should end with “/”.

Sending Email with Attachment in Magento 2.3.x

The Magento 2.3.x framework (actually as all previous versions) does not provide an opportunity for Sending Emails with Attachment to email messages. However, the implementation of this functionality for Magento 2.3.x is different from that of previous versions.  That’s the reason the Magento 2.3.x framework uses Zend Framework 2 (ZF2) and almost totally refuses to apply ZF1. 

There listed all Magento extensions are tested and fully compatible with Magento version 2. click here

In This Article, we are going to describe how to implement the email with attachment in Magento 2.3.X with using the Coding technique.

To understand this process, it’s recommended to get an idea of some of the ZF2 components such as:

As createAttachment() method is no more available, we will override Magento\Framework\Mail\Message and create a class which will implement Magento\Framework\Mail\MailMessageInterface.

In this method, we will redifine/create some methods which would be responsible for different MIME parts which would be merged later before being sent. Let’s see some of the important ones:

Message::setBodyText() Method

In this method, we are adding the text MIME part to the email and storing in $this->parts array.

Message::setBodyHtml() Method

In this method, we are doing the same as above but we are setting the HTML part and storing in the same $this->parts array.

Message::setBodyAttachment() Method

Here we set the content of the file, then set a file type and specify its name. In addition, we set disposition. It’s necessary for the file to be treated as an attachment.

Above we’ve described all methods that help us to add mime parts to the message. But we also added to this class one more important method – Message::setPartsToBody().

Message::setPartsToBody() Method

This method is used to put all the pieces together.

Now, we will create a new class TransportBuilder which will extend the actual core class Magento\Framework\Mail\Template\TransportBuilder and instead of the core class, we will be using this new class.

TransportBuilder::addAttachment() Method

Now, you can call this method while sending mail as used in this file.

Further, you can find the entire module here. GitHub

Magento 2 Console Command Sortcuts

While working on Magento 2.x, you often need to run several console commands which are actually very handy in terms of managing the things such as cache, upgrades, deploy modes, indexers etc. You can check the entire list of commands by running this command:

 php bin/magento list 

Well, typing the full long commands are not very pleasant if it has to be done multiple times. So, we can use shortcuts instead full commands. This feature comes due to the Symphony framework which is used by each console class that implement command line functionality. The use Symfony\Component\Console\Command component to implement command line features. You can learn more in the documentation of Symphony framework. You can use shortest unambiguous name intead of full name, e.g. s instead of setup.

Now, let’s see shortcuts for some of the commonly used Magento 2 console commands:

1. Cache Commands

Where cache_type is the parameter in which you can pass one or more cache types separated by whitespaces, e.g.

php bin/magento c:c config layout

2. Indexer Commands

You may pass parameters for particular indexer type as well.

3. Compile Command

4. Setup Upgrade Command

5. Static Content Deploy Command

6. Module Management Commands