Redirect base URL to another domain

Sometimes it require to redirect the user if he hits the base url to another page.

e.g.

If the user hits www.example.com then it should be redirected to www.example.com/welcome.html

For the above you would have to enter the following line in your .htaccess file.

RewriteEngine on

RewriteRule ^$ http://example.com/welcome.html [R=permanent,L]

Share and Enjoy

  • Facebook
  • Twitter
  • Google Plus
  • Live
  • Delicious
  • Digg
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS
  • Instapaper
  • FriendFeed

Comments

  1. I feel this is among the such a lot vital information for me. And i am satisfied reading your article. But should observation on some general things, The site style is perfect, the articles is in point of fact great : D. Excellent task, cheers

  2. You need to take part in a contest for among the best blogs on the web. I will advocate this web site!