The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

.htaccess Parked Domain Looping

Discussion in 'General Discussion' started by rwagener11, Nov 5, 2008.

  1. rwagener11

    rwagener11 Member

    Joined:
    Jun 7, 2006
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    I have been reading and reading and reading. I can't seem to get the correct settings.

    I want to have a parked domain forward to one page on my site. I want it to show the parked domain as the domain. However leaving the rest of the site untouched.

    I have written

    Code:
    Options +FollowSymlinks 
    RewriteEngine On
    RewriteCond %{HTTP_HOST} parkeddomain.net$
    RewriteCond %{REQUEST_URI} !^/dir/dir/?cat=1084&manufacturer=Main
    RewriteRule ^(.*)$ http://parkeddomain.net/dir/dir/?cat=1084&manufacturer=Main [R=301,L] 
    
    my understanding is this will only redirect if that domain doesn't reside in that directory. If it does reside in that directory then don't redirect. But this keeps looping and looping.

    WHAT AM I DOING WRONG?
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Have you considered using the "Park Domain" feature in cPanel instead? Based on what you are desiring to do, it seems this functionality would meet your needs.
     
  3. rwagener11

    rwagener11 Member

    Joined:
    Jun 7, 2006
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Yes

    Actually yes I did use the feature inside cpanel. Once I setup in cpanel then I want to lock down the addon. I don't want that parked domain to go to any other page than the one specified.

    For instance, I don't want them to be able to go to parkeddomain.com instead I want them to go to maindomain.com/dir/dir/etc/ looking like parkeddomain.com/dir/dir/etc/. Once they click a link on that page then it will goto the maindomain.com.

    I know it's possible. I just am doing something wrong with the .htaccess file.
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,470
    Likes Received:
    199
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    So then use the redirects section in cPanel to write the htaccess for you.
     
  5. rwagener11

    rwagener11 Member

    Joined:
    Jun 7, 2006
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    The redirect tool isn't what I am looking for. It will redirect everything (maindomain.com) but not just the parked domain to a particular page. Please read the first post.

    Thanks for trying...
     
  6. lngtanseco

    lngtanseco Well-Known Member

    Joined:
    Jun 9, 2006
    Messages:
    64
    Likes Received:
    0
    Trophy Points:
    6
    Try this:

    edit the file httpd.conf

    Code:
    vi /usr/local/apache/conf/httpd.conf
    if maindomain.com username is maind

    Code:
    <VirtualHost xx.xx.xx.xx:80>
        ServerName maindomain.com
        ServerAlias www.maindomain.com www.parkeddomain.com parkeddomain.com
        DocumentRoot /home/maind/public_html
        ServerAdmin webmaster@maindomain.com
       .................
    </VirtualHost>
    then

    Code:
    /usr/local/cpanel/bin/apache_conf_distiller --update
     
  7. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,470
    Likes Received:
    199
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    I did. It must not be clear, or I'm thick. But if you have a parked domain you'd like to point to something, it is listed (the parked domain) in the drop down list on the redirect page. Selecting it, and then pointing it to the place you want it go is not what you seek?
     
Loading...

Share This Page