Hi, I just want to know is it compulsory to take dedicated ip to run .htaccess file for 301 redirection? OR it works on shared IP as well?
Dedicated IP? .htaccess can redirect anywhere you want. Can bounce to someserver.com or 1.2.3.4 What is the real question here? If your looking to use a 301 redirect to specific site on shared host then you will 100% want to redirect by domain name and not the default IP address of the server. If you redirect to the main IP of a shared host you will undoubtedly get undesired results.
Thanks for your response. The actual question is when, I put 301 redirection code in my .htaccess file (non www to www and index.html to /) then my site shows 500 internal server error as, I delete that code from .htaccess it begins to run. I want to know the solution of this problem.
it works on shared hosting. the error 500 simply means that there's something wrong with your .htaccess file. try this if you want a 301 redirect. save it as .htaccess file in your webspace.