I need to redirect the whole website to a specific url i.e to


using htaccess? How I can do that. I tried the following stuff it it show redirection loop

    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule !^/?(customer/account/create|.*\.css|.*\.js)$   http://local.com/customer/account/create [R=302,L]

    RewriteRule ^([A-Za-z0-9]+)$ $1.php
    RewriteRule ^home\.php$ index.php 
    RewriteRule ^home$ index.php
  • Maybe you should skip this specific rewrite rule in the destination site's htaccess. – Zsolti Jan 6 '16 at 13:30
  • I didn't get you want you are saying – Vivek Khandelwal Jan 6 '16 at 13:33
  • You are redirecting with a rule like: redirect FROM X to anotherdomain/X, but if the same rule is applied also in the "anotherdomain", then it will redirect in an infinite loop. So what I am suggesting is to remove that rewrite rule only on "anotherdomain". – Zsolti Jan 6 '16 at 13:38
  • can u suggest me some rules for that.. and one more thing I want to redirect to a url in same domain – Vivek Khandelwal Jan 7 '16 at 4:08
  • I tried your example and it worked. Maybe you are editing a .htaccess file which is not in the root of your Magento? That would answer the problem. – Zsolti Jan 7 '16 at 9:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.