Redirect URLs in Magento using .htaccess file

Some time ago, I’ve showed that how you can redirect URLs in Magento using URL Rewrite Management built in feature of Magento. Sometimes it happens when you can’t redirect URL using URL Rewrite Management; at that time you can use the file .htaccess to redirect those URLs. There are different syntaxes to redirect URL in .htaccess file but the following method works for Magento. Follow the steps to redirect URLs.

  • Open the .htaccess file of your Magento website.
  • Search for the field “enable rewrites” in that file. You can find your previous URL rewrites here and you should done your all the URL rewrite here as it’s best practices to put your all URL redirection at same place.
  • Here is the syntax to redirect any URL:
    RewriteEngine on
  • You don’t have to write “RewriteEngine on” every time.  It is just one time process. RewriteEngine should be enabled to order to redirect the URLs from .htaccess.
  • Save these changes in .htaccess file.

And you’re done; you can check the old URL which will be now redirected to New URL if you followed the procedure correct.

Drop me a line if you are unable to redirect URL using this method.

Know Magento Order Confirmation Email Process

Hello friends,

While working with magento site developers should know the process of placing an order. The normal process of placing an order in magento is as under:

Step 1: Customer chooses the products from magento site according to their requirements and adds those products to cart.

Step 2: Customer fills the shipping and billing information.

Step 3: Customer selects the payment method and gives the payment information.

Step 4: Customer clicks on “Place Order” button and order is placed.

Step 5: Customer is redirected to the checkout success page and order confirmation email is sent to him/her.

Normally in magento we are using one-page checkout and order confirmation email is sent from /app/code/core/Mage/Checkout/Model/Type/Onepage.php file.

But the order confirmation email is sent from magento only if we are not using third party external payment system and not redirecting over there.

This is because magento assumes that the order confirmation email will be sent by the redirected third party external payment gateway like: Paypal, Google Checkout.

Now if some developer gets an exception of order confirmation email not sent, then first of all he should check whether the order has been placed using any third party external payment system or not?

And if the order has been placed using any third party external payment system then he should check whether the code to send the email exists in that third party module or not. Because if there is any problem with that code in the third party module or there is no code at all then the mail won’t be sent.  So better check that possibility as well.

Hope this will help you.