Web Technology Experts Notes

We are Web Technology Experts Team who provide you Important information on Web Development, Interview Questions and Answers, live project problem and their solution and online free tutorials.

  • Home
  • PHP
    • PHP Interviews Questions
    • LIVE Project Problem
    • PHP Functions
    • PHP Security
    • PHP Questions
    • PHP 7 Updates
    • Papal Integration
    • PHP MySQL
    • Regular Expression
  • Databases
    • MySQL Interview Questions
    • MYSQL Database
    • MYSQLI Database
    • MYSQL Query
    • MongoDB Database
    • MongoDB Mongoose
    • Redis
    • MySQL Console Commands
  • Framework / CMS
    • Laravel
    • Zend Framework 1
    • Zend Framework 2
    • Zend Framework 3
    • Wordpress
  • Javascript
    • NodeJS
    • MongoDB
    • ExpressJs
    • JSON
    • JavaScript Interview
    • jQuery
    • JavaScript
    • Ajax
    • Google Map
    • jQuery Plugin
  • Interview Question
    • Node Js Interview Questions
    • PHP Interview Questions
    • MySQL Interview Questions
    • JavaScript Interview
    • Zend Interview
    • Ajax Interview
    • Apache Interview Questions
    • OOPs Interview Questions
  • Web Services / API
    • Web Services
    • Facebook Integration
    • Paypal Integration in Website
    • APIs
    • Braintree Quick Integration
    • Amazon Integration
    • Twitter Interation
    • Shell Script
    • Youtube Interation
  • Web Development
    • AWS Integration
    • Unix Commands
    • Htaccess
    • Paypal
    • Braintree
    • FFMPEG
    • Web Services
    • Facebook Integration
    • Linux
    • Regular Expression
    • Server
    • Wamp Server
  • Write for Us

Tuesday, 3 March 2015

non-www Redirect to www htaccess

non-www Redirect to www htaccess

If you want to redirect http://example.com to http://www.example.com
Open your .htaccess file and add following code.

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]



Best Related Posts are Following:

  1. How to redirect http to https in Zend Framework.
  2. Redirect internal links to another file with .htaccess.
  3. htaccess allow for IP address and should not ask for Authentication.
  4. How can I make a redirect page using javascript jQuery PHP and htaccess.
  5. Htaccess interview Questions and Answers for fresher and experienced.
  6. How to redirect https to http in htaccess.
  7. non-www Redirect to www htaccess.
  8. Wordpress redirect https to http with htaccess [SOLVED].
  9. Htaccess RewriteRule Flags by Code Example.
  10. htaccess code snippets example.
Labels: htaccess
‹
›
Home
View web version
Powered by Blogger.