• i am facing 500 – Internal server error. what when i open .htaccess file it is written as

    <FilesMatch ".(py|exe|phtml|php|PHP|Php|PHp|pHp|pHP|phP|PhP|php5|suspected)$">
    Order allow,deny
    Deny from all
    </FilesMatch>
    <FilesMatch "^(index.php|credits.php|customize.php|edit-comments.php|edit-tags.php|edit.php|checkbox.php|export.php|input.php|link.php|load-scripts.php|load-styles.php|dropdown.php|menu.php|nav-menus.php|network.php|options-discussion.php|options-general.php|options-permalink.php|options-privacy.php|options-reading.php|options-writing.php|plugins.php|post-new.php|post.php|privacy.php|profile.php|site-health.php|term.php|text.php|themes.php|tools.php|update-core.php|user-edit.php|user-new.php|users.php|wp-links.php|wp-login.php|wp-signup.php)$">
    Order allow,deny
    Allow from all
    </FilesMatch>
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . index.php [L]
    </IfModule>

    and i know that usually .htaccess file is like this

    # BEGIN WordPress
    
    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    
    # END WordPress

    now what i do kindly help me

Viewing 7 replies - 1 through 7 (of 7 total)
  • @atifnawaz Apologies if this is too basic of a recommendation, but have you tried pasting the WordPress code for .htaccess into .htaccess and replace what’s there? You could make a backup of .htaccess and test it out and if it doesn’t work, revert back to the original code.

    Thread Starter Atif Nawaz

    (@atifnawaz)

    thanks for your help yes i did it on local host i replace the .htaccess file with a local host website but it work no error appear.

    That’s great that you were able to get it working!

    Thread Starter Atif Nawaz

    (@atifnawaz)

    when i try to replace it this message appear
    “Error:
    Access to the path ‘D:\home\abcdft5555.com\wwwroot\.htaccess’ is denied

    • This reply was modified 2 years, 7 months ago by Atif Nawaz.

    That sounds like a file permission issue on .htaccess which is preventing you to save to it. You may need to get in touch with your hosting company about getting permission to modify the file. You could try changing the permission to 644, which will allow the owner of the file to read/write. You could temporarily change the permissions higher until you can write to the file but you’ll want to make sure it’s back to 644 after editing for security reasons.

    Thread Starter Atif Nawaz

    (@atifnawaz)

    I check but it also not changing.

    This one might be difficult to troubleshoot, but if you could look at the permissions level on your htaccess and add it to the thread (it should be a 3-digit number) or take a screenshot, I can try to walk you through how to change it if it’s needed.

    Alternatively, this might be something better-suited for your hosting company to help you with if you’re not able to modify your .htaccess file. Some hosting companies lock down those files, so you may need their assistance.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘500 – Internal server error.’ is closed to new replies.