1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

redirect problem

Discussion in 'Site & Server Administration' started by Chancey, Oct 17, 2017.

  1. #1
    I want my site turn my website address from site.com to www.site.com . I already try using a plugin to solve it, but it didn't help all.
     
    Chancey, Oct 17, 2017 IP
  2. Arun Kumar Soni

    Arun Kumar Soni Well-Known Member

    Messages:
    271
    Likes Received:
    16
    Best Answers:
    2
    Trophy Points:
    115
    #2
    Use .htaccess
    RewriteEngine on
    Redirect site.com www.site.com
     
    Arun Kumar Soni, Oct 17, 2017 IP
  3. bellagarcia

    bellagarcia Peon

    Messages:
    18
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    1
    #3
    If plugin won't work try to use htaccess.
     
    bellagarcia, Oct 17, 2017 IP
  4. phpmillion

    phpmillion Member

    Messages:
    145
    Likes Received:
    11
    Best Answers:
    4
    Trophy Points:
    45
    #4
    Edit your .htaccess file and add these lines:

    https://pastebin.com/g5sr2CMd (had to use PasteBin because DP Forums block some parts of the code)

    It will work on ANY domain, so you can use exactly the same code for all your sites without changing hostnames.
     
    phpmillion, Oct 18, 2017 IP
  5. polusweb

    polusweb Peon

    Messages:
    11
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    1
    #5
    The best option is .htaccess
     
    polusweb, Oct 18, 2017 IP