Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to rewrite the URL such that, when some one type http://example.com it automatically replaced with http://www.example.com
can some one tell me what code should i use in .htacess so achieve my purpose.
Posted

Check out the Apache rewriting guide[^] - what you are asking for is one of the first examples on the page.
 
Share this answer
 
it is very well documented in apache programmer mannual... kindly find it below...


http://httpd.apache.org/docs/2.0/misc/rewriteguide.html[^]


mark as answer if solves your problem, it motivates :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900