Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2002
    Location
    Somewhere in Georgia
    Posts
    17

    Question cPanel Redirect from http://domain to http://www.domain

    I want to permanently redirect traffic from:

    http://domain.com

    to:

    http://www.domain.com

    within cPanel. I've tried adding the www within the url in the cPanel field, but the site drops. Anyone know how to do this or even if it's possible with cPanel? Thanks.
    Leverable - Lift for the Good Guys

  2. #2

    try this

    Add the following code to your .htaccess file and clean your browser before testing it.

    Options +FollowSymLinks
    AllowOverride FileInfo
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^example\.com
    RewriteRule (.*) http://www.example.com/$1 [R=301,L]


    I don't know of anyway to do what you want using cpanel though.

  3. #3
    In cpanel click on Redirects.
    In the first box, type nothing.
    In the second box type the location of the other domain.
    Select Permanent in the dropdown box.
    Click Add.

    I hope this helps.

    - LH
    If the web closed at midnight, what would YOU do?

  4. #4
    Join Date
    Oct 2002
    Location
    Somewhere in Georgia
    Posts
    17

    Re: try this

    Originally posted by gonefishing
    Add the following code to your .htaccess file and clean your browser before testing it.

    Options +FollowSymLinks
    AllowOverride FileInfo
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^example\.com
    RewriteRule (.*) http://www.example.com/$1 [R=301,L]


    I don't know of anyway to do what you want using cpanel though.
    Is there a proper place to put these lines in the .htaccess file? If I put them under the other redirects such as

    Redirect permanent /directory/file.php

    I get a server error, I think it was the 500. Thanks.
    Leverable - Lift for the Good Guys

  5. #5

    .htaccess

    Can you post the current working .htaccess file. The code I posted should come before any other redirects.

    RewriteEngine On
    Options +FollowSymLinks
    AllowOverride FileInfo
    RewriteCond %{HTTP_HOST} ^mysite.com
    RewriteRule (.*) http://www.mysite.com/$1 [R=301,L]
    Last edited by gonefishing; 06-05-2005 at 04:35 AM.

  6. #6
    Join Date
    Oct 2002
    Location
    Somewhere in Georgia
    Posts
    17
    Here's the current one. Thanks.

    # -FrontPage-

    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

    <Limit GET POST>
    #The next line modified by DenyIP
    order allow,deny
    #The next line modified by DenyIP
    #deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName www.mysite.com
    AuthUserFile /home/clickfir/public_html/_vti_pvt/service.pwd
    AuthGroupFile /home/clickfir/public_html/_vti_pvt/service.grp
    Redirect permanent /savior http://www.mysite.com/viewpoints/articles/christian
    Redirect permanent /tools/mettyonline/ http://www.mysite.com/tools/searchengine/mettyonline_meta_tag_generator.php
    Redirect permanent /writing/essays.htm http://www.mysite.com/viewpoints/articles/political/elephants.php
    Redirect permanent /metty http://www.mysite.com/tools/freeware/metty
    Redirect permanent /viewpoints/articles/spiritual http://www.mysite.com/viewpoints/articles/christian
    Redirect permanent /freegraphics http://www.mysite.com/content/graphics
    Redirect permanent /freegraphics/index.htm http://www.mysite.com/content/graphics
    Redirect permanent /emory/index.htm http://www.mysite.com
    Redirect permanent /emory/fccw/index.htm http://www.mysite.com
    Redirect permanent /emory/centrodevictoria/index.htm http://www.mysite.com
    Redirect permanent /viewpoints/articles/auctions/index.php http://www.mysite.com/viewpoints/articles/auctions/ebay.php
    Redirect permanent /writers/index.php http://www.mysite.com/writers/emory%20rowland/index.php

    Redirect permanent /affiliates/webmaster-talk.com/webmaster-talk-forums.php http://www.mysite.com/viewpoints/reviews/websites/

    Redirect permanent /tools/webdesign http://www.mysite.com/tools/web_design

    Redirect permanent /tools/web_design/menumaker http://www.mysite.com/tools/web_design/menu_maker

    Redirect permanent /tools/christian/biblestudy http://www.mysite.com/tools/christian/bible_study

    Redirect permanent /freeware/metty http://www.mysite.com/tools/freeware/metty

    Redirect permanent /download/rdsetup.exe http://www.mysite.com/download/rd10.exe


    <Files 403.shtml>
    order allow,deny
    allow from all
    </Files>

    deny from 24.167.242.185
    deny from 67.163.64.212
    deny from 62.65.252.68
    deny from 66.7.164.225
    deny from 216.169.118.12
    deny from 209.10.169.53
    deny from 209.8.166.192
    deny from 207.44.130.115
    deny from 66.174.3.30
    Leverable - Lift for the Good Guys

  7. #7
    If you don't mind me asking, what purpose does this redirect serve, other than adding the www? Is it just asthetic?

  8. #8
    Join Date
    Oct 2002
    Location
    Somewhere in Georgia
    Posts
    17
    It's partly aesthetic, yeah, but also for uniformity.
    Leverable - Lift for the Good Guys

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •