Skip to main content

index.php not found in cpanel, error 404

Comments

18 comments

  • 24x7ss
    Hi, Comment out RewriteRule ^index.php/(.*)$ /$1 [R=302,L] and add below code, DirectoryIndex index.php
    0
  • Marcello Henrique
    i made the changes but i still have the same error.
    0
  • cPanelMichael
    "The requested URL /home/teste2/pqr/public_html/myProject/index.php was not found on this server."

    Hello, Have you verified this is the correct path for the index.php file? For instance, have you created an alternate document root for your domain name (e.g. the default is /home/$username/public_html)? Thank you.
    0
  • Marcello Henrique
    yes. it's correct! (look the screenshot) - if i remove the RewriteRule line, the error changes... The requested URL /~pqr/praquerumo/controller/attribute was not found on this server. the url is right, but the page isnt displayed. if i put index.php on the url, /~pqr/praquerumo/index.php/controller/attribute the pages opens normally
    0
  • cPanelMichael
    The requested URL /~pqr/praquerumo/controller/attribute was not found on this server.

    The error message indicates you are using Apache Mod_UserDir to access the website. Have you tried accessing the domain name directly? Thank you.
    0
  • Marcello Henrique
    The error message indicates you are using Apache Mod_UserDir to access the website. Have you tried accessing the domain name directly? Thank you.

    i'm with mod rewrite enabled, if you access domain.com/~pqr/praquerumo/ it'll work. but, if you try to click on an activity, the error will appear
    0
  • Marcello Henrique
    i've downloaded a new codeigniter project and put this .htacess RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] works on my localhost, and isnt working on the server.
    0
  • cPanelMichael
    Hello, Could you clarify if you are using Apache Mod_UserDir to access the content? It's known to have compatibility issues with Mod_Rewrite rules. It's better to modify the hosts file on your computer to preview the site before changing the name servers. Thank you.
    0
  • Marcello Henrique
    Could you clarify if you are using Apache Mod_UserDir to access the content?

    where i can check it? sorry i'm newbie. i asked the webmaster, and i'm waiting his answer *update: i asked the webmaster to disable Mod_UserDir, but it didnt change anything*
    0
  • cPanelMichael
    where i can check it? sorry i'm newbie.

    What do you see in your browser address bar (replace the actual domain name or IP with an example)? Thank you.
    0
  • Marcello Henrique
    http:/server.com/~user/project/controller/attribute
    0
  • Marcello Henrique
    What do you see in your browser address bar (replace the actual domain name or IP with an example)? Thank you.

    http:/server.com/~user/project/controller/attribute Error message The requested URL /home/teste2/user/public_html/project/index.php/controller/attribute was not found on this server. my htacess is with 755 permission. i've already changed to 777 (for tests) and the errors changes to an error 500.
    0
  • cPanelMichael
    http:/server.com/~user/project/controller/attribute

    You will need to use the actual domain name instead of the Mod_Userdir URL to ensure compatibility with Mod_Rewrite rules. EX:
    domain.com/project/controller/attribute
    Have you changed the name servers for this domain name yet so it points to your server? Thank you.
    0
  • Marcello Henrique
    Have you changed the name servers for this domain name yet so it points to your server?

    well, my domain is pointing to another server. maybe it could be the reason. i'm gonna change it and i'll tell you if it worked or not.
    0
  • Marcello Henrique
    changed my domain's pointing and it's working! but, not in my subdomain! ahhhahahh
    0
  • cPanelMichael
    but, not in my subdomain! ahhhahahh

    Did you change the name servers, or simply update the "A" record at your DNS provider? If you only changed the "A" record, then you must also do so for each subdomain entry. Thank you.
    0
  • Marcello Henrique
    Did you change the name servers, or simply update the "A" record at your DNS provider? If you only changed the "A" record, then you must also do so for each subdomain entry. Thank you.

    well, everything is working fine. i think the dns has taken a little bit time to solve my subdomain.
    0
  • cPanelMichael
    I am happy to see the issue is now resolved. Thank you for updating us with the outcome.
    0

Please sign in to leave a comment.