1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Redirect www.[name].com domain to [name].com domain

Discussion in 'Plesk for Linux - 8.x and Older' started by open4biz, Oct 11, 2007.

  1. open4biz

    open4biz Guest

    0
     
    When I set up my domains in Plesk, I set them up so they did not need the www in front of the domain name (i.e. www.mydomain.com).

    Now I would like to make it idiot proof and send the user that mistakenly types www to the www-less domain name. Would you do that with the DNS setup section of the domain control panel?

    I set up cname records for all three of my domains (www.blah.com automatically goes to blah.com)... but the third doesn't seem to be working. Which got me to thinking, did I do it correctly? Is that the technically correct way? Or should I use a redirect script?

    Any help would be appreciated. :p
     
  2. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    you can do that with mod_rewrite - check into that.
     
  3. open4biz

    open4biz Guest

    0
     
  4. 64bithost.com

    64bithost.com Regular Pleskian

    25
    57%
    Joined:
    Jul 30, 2007
    Messages:
    182
    Likes Received:
    0
    .htaccess file

    Try using an .htaccess file using the following paramaraters.


    # permanently redirect from www domain to non-www domain
    RewriteEngine on
    Options +FollowSymLinks
    RewriteCond %{HTTP_HOST} ^www\.INSERTDOMAINNAMEHERE\.com$ [NC]
    RewriteRule ^(.*)$ http://INSERTDOMAINNAMEHERE.com/$1 [R=301,L]

    # redirect a specific file via 301
    redirect 301 /INSERT_URL_HERE.html http://INSERTDOMAINNAMEHERE.COM

    #save this file as .htacess
    #in your httpdocs file it should then
    #redirect to the domain of your choice.

    -Chris
     
  5. open4biz

    open4biz Guest

    0
     
    Thanks :O)
     
  6. JamieRW

    JamieRW Guest

    0
     
    Hi 64bithost.com, I am struggling to get this to work. I have tried various methods ref. :http://forum.parallels.com/showthread.php?t=88372

    Are you able to offer any suggestions?

    DM.
     
Loading...