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.
    SEMrush
     
    Chancey, Oct 17, 2017 IP
    SEMrush
  2. Arun Kumar Soni

    Arun Kumar Soni Active Member

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

    bellagarcia Banned

    Messages:
    5
    Likes Received:
    0
    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:
    50
    Likes Received:
    4
    Best Answers:
    2
    Trophy Points:
    25
    #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