Activity Stream
48,167 MEMBERS
64775 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 6 of 6
  1.     
    #1
    Member

    Default How to redirect non-www domain to www domain?

    I tried adding this code in .htaccess file but it's not working

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^example.com
    RewriteRule (.*) http://www.example.com/$1 [R=301,L]
    18folder Reviewed by 18folder on . How to redirect non-www domain to www domain? I tried adding this code in .htaccess file but it's not working RewriteEngine On RewriteCond %{HTTP_HOST} ^example.com RewriteRule (.*) http://www.example.com/$1 Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Pure Awesomeness!
    # Redirect www urls to non-www
    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^example\.com
    RewriteRule (.*) http://www.example.com/$1 [R=301,L]

    Try that, works for me.



  4.     
    #3
    Member
    I want to redirect NON-WWW to WWW

    btw i got redirection in loop error while accessing www.domain.com when i tried your code

  5.     
    #4
    Member
    Website's:
    ExYuWarez.com BudiHuman.com FilmoviSaPrevodom.info HDSrbija.com EpicFun.info WindowsTuts.com
    Quote Originally Posted by 18folder View Post
    I tried adding this code in .htaccess file but it's not working

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^example.com
    RewriteRule (.*) http://www.example.com/$1 [R=301,L]
    i have this code in my htaccess file, and it works.
    Adspots on ExYuWarez.com - $3 monthly | PM me for more informations.

  6.     
    #5
    I r Super Cop
    check with your host if the re-write module for apache is on
    Follow besthostingforums on FB

    Looking for an Article Writer? Check out my services here.

  7.     
    #6
    Member
    @Rox do you know how can i check that? I looked in httpd.conf file once but this line

    LoadModule rewrite_module modules/mod_rewrite.so

    was not available in that file, so i added this line but then it gave me this error when restarting httpd service


    module rewrite_module is built-in and can't be loaded

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. how to redirect old domain to new domain in nginx? but...
    By bachbell in forum Server Management
    Replies: 2
    Last Post: 29th Oct 2012, 02:14 PM
  2. Old Domain to a New Domain Redirect?
    By DoggY DuKe in forum Web Development Area
    Replies: 14
    Last Post: 15th Apr 2012, 06:42 PM
  3. Replies: 4
    Last Post: 15th Nov 2010, 04:28 AM
  4. Domain Redirect?
    By bxflow in forum General Discussion
    Replies: 12
    Last Post: 29th Aug 2010, 06:01 AM

Tags for this Thread

BE SOCIAL