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.

500 Internal server error after deleting .htaccess file.

Discussion in 'General Discussion' started by b24rye, Sep 1, 2014.

  1. b24rye

    b24rye Registered

    Joined:
    Sep 1, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi friends, I have accidently deleted my .htacces file in cpanel and didn't know how to recover it. :D
    It caused to the 500 Internal Server Error. I have tried some ways but didn't work. :confused:
    Someone can give me a hand, please! :)
     
  2. triantech

    triantech Well-Known Member

    Joined:
    Jul 1, 2014
    Messages:
    145
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Kochi, India, India
    cPanel Access Level:
    Root Administrator
    Hey,

    What was the content of your .htaccess file ? Check what is in the httpd error_logs when
    you visit the website.

    # grep 'domainname' /usr/local/apache/logs/error_log | tail -100
     
  3. server9host

    server9host Well-Known Member

    Joined:
    Sep 18, 2013
    Messages:
    160
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    Please try to use below default .htaccess file :


    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
     
  4. b24rye

    b24rye Registered

    Joined:
    Sep 1, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    @triantech
    Here is the codes:
    Code:
    Mon Sep 01 16:52:22 2014] [alert] [client 113.190.161.56] /home/minaedu/.htaccess: DeflateCompressionLevel not allowed here
    
    [Mon Sep 01 16:42:34 2014] [alert] [client 113.190.161.56] /home/minaedu/public_html/.htaccess: Redirect to non-URL

    @server9host
    Your solution doen't work!

    Thank friends!
     
    #4 b24rye, Sep 1, 2014
    Last edited by a moderator: Sep 2, 2014
  5. b24rye

    b24rye Registered

    Joined:
    Sep 1, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    The only action that caused to this error is deleting .htaccess file. And i'm just needing some guides to recover that file. Nothing more!
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    Yo will not be able to recover the files unless you have backups enabled on your server. If you do, you could extract the backup archive for that account, move those files back into place, and then update the ownership/permission values. Otherwise, check to see if the following files exist:

    /home/$user/.htaccess
    /home/$user/public_html/.haccess

    You mentioned the files were empty, but the error messages suggest otherwise.

    Thank you.
     
Loading...

Share This Page