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.

Problem with add on domain

Discussion in 'General Discussion' started by pradeesh, Dec 30, 2011.

  1. pradeesh

    pradeesh Registered

    Joined:
    Dec 30, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I have created a sub-domain(example.com) in cpanel .But by typing example.com in my browser i'm getting the error msg as "This webpage has a redirect loop "..plz help me i'm new to cpanel
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,807
    Likes Received:
    667
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Please check the .htaccess file in the following location:

    /home/username/public_html/

    Look to see if you have any custom Mod_Rewrite rules in place that could be resulting in a redirect loop for the addon domain name.

    Thank you.
     
  3. larenespitler

    larenespitler Registered

    Joined:
    Jan 7, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I don't have a .htaccess file in the folder
    /home/username/public_html/

    What else could be causing this?
    Larene
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Do you have any .htaccess files in /home/username or /home/username/public_html/addondomain locations? If you do, what are the contents in the file or files?
     
  5. larenespitler

    larenespitler Registered

    Joined:
    Jan 7, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    The directory /home/pdhost10/public_html/.htaccess file is empty

    The /home/pdhost10/public_html/leeprecision.com/.htaccess file contains

    Code:
    # If you would like X-Cart to show informative message for errors caused
    # by opening of missing/deleted files (HTTP Error 404), please uncomment
    # the line below.
    # ErrorDocument 404 /404.php
    ErrorDocument 400 /missingpage.html
    ErrorDocument 401 /missingpage.html
    ErrorDocument 403 /missingpage.html
    ErrorDocument 404 /missingpage.html
    ErrorDocument 500 /missingpage.html
    
    # Show default error document for 404 errors caused by opening of image/media files.
    #<Files ~ "\.(gif|jpe?g|png|js|css|swf|ico)$">
    #    ErrorDocument 404 default
    #</Files>
    
    # Clean URLs [[[
    #Options +FollowSymLinks -MultiViews -Indexes
    #<IfModule mod_rewrite.c>
    #    RewriteEngine On
    #
    #    RewriteBase /
    #
    #           
    #    RewriteCond %{REQUEST_URI} !^/(payment|admin|provider|partner)/
    #    RewriteCond %{REQUEST_FILENAME} !\.(gif|jpe?g|png|js|css|swf|php|ico)$
    #    RewriteCond %{REQUEST_FILENAME} !-f
    #    RewriteCond %{REQUEST_FILENAME} !-d
    #    RewriteCond %{REQUEST_FILENAME} !-l
    #    RewriteRule ^(.*)$ dispatcher.php [L]
    #</IfModule>
    # /Clean URLs ]]]
    
    #
    # QTM optimization, [EMAIL]abr@example.com[/EMAIL] {{{
    #
    RewriteEngine On
    RewriteCond %{HTTP:Accept-encoding} gzip
    RewriteCond %{REQUEST_FILENAME} ^(.*)\.(js|css)$
    RewriteCond %{REQUEST_FILENAME} !\.gz\.(js|css)$
    RewriteCond %1.gz.%2 -f
    RewriteRule ^(.+)\.(js|css)$ $1.gz.$2 [L]
    
    #test mode:
    #RewriteCond %{REMOTE_ADDR} ^83.234.124.243$
    RewriteCond %{HTTP:Accept-encoding} gzip
    RewriteCond %{REQUEST_FILENAME} (.*/xcart/var/cache/.*)\.(js|css)$
    RewriteCond %{REQUEST_FILENAME} !\.gz\.(js|css)$
    RewriteCond %1.gz.%2 !-f
    RewriteRule ^(.+)\.(js|css)$ /xcart/qt/compress.php?script=%{REQUEST_FILENAME} [L]
    
    AddEncoding gzip .gz.js
    AddEncoding gzip .gz.css
    
    #Aux debug script
    #php_value auto_prepend_file /home/leeprecision/www/example.com/html/xcart/qt_debug.php
    # QTM optimization, [EMAIL]abr@example.com[/EMAIL] }}}
    
    # redirects
    Redirect /cgi/faq/index.cgi http://example.com/xcart/Frequently-Asked-Questions.html
    
    # ------------------------------------
    # CDSEO Pro
    # ------------------------------------
    # This directory index is recommended to replace the
    # x-cart default within this .htaccess file
    DirectoryIndex home.php index.html index.php
    
    # Enable mod rewrite engine
    RewriteEngine On
    
    # .htpasswd protection
    # May be required if your htpasswd files are located below document root (i.e. cpanel)
    # Remove # at the beginning of this line if your unable to access password protected folders:
    #ErrorDocument 401 "Unauthorized"
    
    # Some servers require this Options directive to be disabled
    # Remove # at the beginning of this line to disable:
    #Options -Multiviews
    
    # Some servers require the Rewritebase directive to be enabled
    # Remove # at the beginning of this line to enable:
    #RewriteBase /
    
    RewriteCond %{REQUEST_URI} !^/(payment|admin|provider|partner)/
    RewriteCond %{REQUEST_FILENAME} !\.(gif|jpe?g|png|js|css|swf|php|ico)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule ^(.+)$ cdseopro.php
    # ------------------------------------
    # / CDSEO Pro
    # ------------------------------------
    
    The subdomain I am using is admin.example.com which points to
    /home/pdhost10/public_html/example.com/html

    The .htaccess file is as follows:

    Code:
    AuthUserFile /home/pdhost10/public_html/example.com/html/.htpasswd
    AuthGroupFile /dev/null
    AuthName "RESTRICTED ACCESS"
    AuthType Basic
    <Limit GET POST>
    require user jlee
    require user jcarter
    require user leeprecision
    require user larene
    require user techsupport
    </Limit>
    
    If this last .htaccess file is present, I have a redirect problem. If it is removed, the page loads just fine.

    Thanks for your help.
    Larene
     
    #5 larenespitler, Jan 19, 2012
    Last edited by a moderator: Jan 14, 2016
Loading...

Share This Page