WordPress.org

Ready to get started?Download WordPress

Forums

.htaccess root and Internal Server Error (500) (5 posts)

  1. newboxters
    Member
    Posted 4 years ago #

    Add the following line to file .htaccess root (powered by wordpress):
    Options -Indexes

    All .htaccess file:

    Options -Indexes
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    But now, almost every week of the file .htaccess is overwritten and the error occurs 500 - Internal Server Error and I have to send my file again .htaccess changes.

    The WordPress automatically changes the. Htaccess root? How to prevent this?

    The last .htaccess error:

    # BEGIN WordPress#<IfModule mod_rew<IfModulRewriteEngine On
    RewriteBase /
    RewriteCond %{REQRewriteCond %{REQUERewriteCond %{REQRewriteCond %{REQUERewriteRule . /inRewriteRule </IfModule>
    
    # END WordPress
    
    # END WordPress

    I need urgent support, because my site is very unstable. Thanks.

  2. Sina-M
    Member
    Posted 4 years ago #

    You need disable your permalink option. because it's related to Apache mod_rewrite and .htaccess.

    Do it:
    1. login to your WordPress as admin
    2. select tools->permalink ( http://www.domain.com/wp-admin/options-permalink.php )
    3. select first option (http://www.domain.com/?p=123)
    4. save changes.

    * finally) upload your new .htaccess again,it will not change till you change your permalink's settings.

    Regards,
    Sina M

  3. Sina-M
    Member
    Posted 4 years ago #

    What do you want to do exactly?

    It's better which you don't change it.
    It's not good point for your SEO.

  4. newboxters
    Member
    Posted 4 years ago #

    Thanks for your reply.

    But really I can not turn off the permalinks, because I always used in all projects that I do with WordPress (and to other systems), always use permalinks, the server correctly supports the .htaccess.

    What happens is that recently I am having problems because my file .htaccess automatically is replaced by wordpress and it generates the error 500.

    Well, I must add a new line in the .htaccess:
    Options -Indexes (not to list directories).

    So I would like to know, how to keep the permalinks active, but not allow the WordPress overwriting my .htaccess

    So why has not sense the system to overwrite the file .htaccess not I change any configuration of permalink.

    And I need this urgent solution, because my site is unstable now, I do not know which frequency to the right .htaccess is substituted or replaced because it is, but it would not happen anymore.

    Thank you.

  5. madewira
    Member
    Posted 4 years ago #

    you may try to lock your .htaccess file using 444 chmod permission from FTP

Topic Closed

This topic has been closed to new replies.

About this Topic