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
Newer Post Older Post Home
View mobile version

Blog Archive

Featured post

How to resize images in php

Google Search

Recent Updated

  • PHP Program Reverse the String without Function
    PHP Program Reverse the String without Function
  • MySQL - SQL Injection Cheat Sheet
    MySQL - SQL Injection Cheat Sheet
  • Root Causes of Session Hijacking and Session Fixation and Broken Authentication
    Root Causes of Session Hijacking and Session Fixation and Broken Authentication
  • What is sensitive data exposure
    What is sensitive data exposure
  • XML external entity vs Broken Access Control vs Security Misconfiguration
    XML external entity vs Broken Access Control vs Security Misconfiguration

Tags

  • API ( 11 )
  • AWS ( 27 )
  • Ajax ( 16 )
  • Amazon ( 8 )
  • Android ( 5 )
  • CURL ( 4 )
  • Difference between ( 23 )
  • Email ( 12 )
  • ExpressJs ( 10 )
  • FFMPEG ( 11 )
  • JSON ( 5 )
  • JavaScript ( 15 )
  • Linux ( 7 )
  • MYSQL ( 39 )
  • Model ( 3 )
  • MongoDB ( 29 )
  • Mongoose ( 5 )
  • MySQLI ( 4 )
  • NodeJS ( 52 )
  • OOP ( 5 )
  • PHP Functions ( 50 )
  • PHP security ( 32 )
  • Regular Expression ( 5 )
  • SVN ( 5 )
  • Server ( 4 )
  • Shell Script ( 9 )
  • Topics ( 13 )
  • Unix Commands ( 23 )
  • Wamp Server ( 3 )
  • Web Services ( 38 )
  • ZF3 ( 4 )
  • htaccess ( 12 )
  • jquery ( 21 )
  • mysql query ( 4 )
  • php ( 24 )
  • redis ( 4 )
  • twitter ( 5 )
  • vulnerabilities ( 5 )

Share

www.web-technology-experts-notes.in. Powered by Blogger.
  • Home |
  • Contact Us |
  • Chat |
  • About US |
  • Privacy Policy / T&C |
  • Site Map |