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.

Problems htaccess

Discussion in 'General Discussion' started by MR-GEORGIA, Feb 3, 2013.

  1. MR-GEORGIA

    MR-GEORGIA Active Member

    Joined:
    Feb 3, 2013
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Welcome. I have a problem with a sub domain of the main domain directory to write to. Htaccess RewriteRule ^ ([^.] +) /? $ Index.php? Do = cat & category = $ 1 [L] ... The main site is working properly. But the subdomain does not work. Example /http://2.aieti.org/. Please nelp..

    The requested URL /home/aieti/public_html/index.php was not found on this server.
     
  2. max_payne

    max_payne Active Member

    Joined:
    Feb 1, 2013
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    I am assuming you have a index.php file uploaded, correct?

    Rewrite rules fall under coding and are usually not supported by any hosting service or cPanel. I recommend posting the rewrite rule on a development/coding help forum and see if there is something wrong with the rule itself. In the mean time, try renaming your .htaccess file to .htaccess.bak and see what happens.

    Also, copy and paste the contents of the apache error logs once you do this:

    cPanel account for aieti>>Error log
     
  3. MR-GEORGIA

    MR-GEORGIA Active Member

    Joined:
    Feb 3, 2013
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Yes they do. There is already a file index. But, do not read them. The error log shows / home/aieti/public_html/2/404.shtml
     
  4. max_payne

    max_payne Active Member

    Joined:
    Feb 1, 2013
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Did you try moving the .htaccess file out of the way by renaming it? The error on the site says:

    The requested URL /home/aieti/public_html/index.php was not found on this server.

    However, it should be reading the file from here:

    /home/aieti/public_html/2/index.php

    Check the document root for this subdomain to see if it is set up properly:

    cPanel>>Subdomains
     
  5. MR-GEORGIA

    MR-GEORGIA Active Member

    Joined:
    Feb 3, 2013
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    When removed. Htaccess file to the main domain, then it works.
     
  6. MR-GEORGIA

    MR-GEORGIA Active Member

    Joined:
    Feb 3, 2013
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    We created a new subdomain from cpanel subdomain section but does not show the index.php, correctly uploaded.
    The domain is registered with the correct dns
    I looked in the DNS from WHM and the subdomain is added right with and without www
    Subdomain folder is created inside the public_html with 755, correct owner, etc
    in http.conf is the section for the subdomain added correclty
    But when i try subdomain.domain.com...

    Forbidden

    You don't have permission to access / on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    But when i try sudbomain.domain.conf/index.php the index is showed correctly

    The DirectoryIndex is not working properly?

    Any ideas please?

    Anothers subdomain under same domain are working properly.

    Thank you.-
     
  7. max_payne

    max_payne Active Member

    Joined:
    Feb 1, 2013
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    You need to look at the apache error logs to see what is causing this. If you have root access to the server, run the following:

    tail -f /usr/local/apache/logs/error_log

    as you view the subdomain in a browser, the error log should show you why you are getting a 404 error. With the information you provided in your last response, this is the first troubleshooting step you should take. Also, try rebuilding your apache config file by running the following:

    /scripts/rebuildhttpdconf

    Not sure what more I can suggest at this point. Anything else will be like shooting darts in the dark.
     
  8. MR-GEORGIA

    MR-GEORGIA Active Member

    Joined:
    Feb 3, 2013
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    RewriteEngine Off write subdomains .htaccess file Works well.. How can I do it? dont Write it.
     
  9. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Instead of a PM, it would be better to reply to the forum thread, so everyone can see the solution and learn from it.
     
  10. MR-GEORGIA

    MR-GEORGIA Active Member

    Joined:
    Feb 3, 2013
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    The problem has been resolved. RewriteEngine Off write subdomains .htaccess file Works well .
    It is not a personal letter is required.
     
Loading...

Share This Page