Viewing 4 replies - 1 through 4 (of 4 total)
  • Getting the .htaccess code wrong can break your site completely. You may not be able to login to your site.

    If this happens you need to access your site file through your hosting file manager e.g. cPanel.

    Login to your hosting management console and go to the root folder of your website. You may need to click the check-box to “show hidden files” before you will see the .htaccess file (it’s often turned off by default on shared hosting accounts).

    Download a copy of the .htaccess file (so you can find any redirects and IP deny rules you may have set) OR just rename it to something like htaccessOLD.txt

    You should now be able to login to your site.

    Go to WordPress Permalinks and rest your permalink settings – WordPress will generate a new default .htaccess file when you save the permalink settings.

    Here’s more info about WordPress htaccess files https://tech.graphicline.co.za/build-wordpress/chapter-2-admin-secure/wordpress-htaccess-file/#fixhtaccess and shows how to un-hide hidden files in cPanel file manager

    Apologies – the correct link for that guide is https://tech.graphicline.co.za/wordpress-admin/wordpress-htaccess-file/#fixhtaccess
    There’s a redirect in place for the other bad link too
    It was too late to edit the original link….

    Thread Starter dt125x

    (@dt125x)

    Hello,

    thanks for long reply…

    My page did not break because I work in yoast…

    I just deleted whole htaccess. code in SEO => EDIT
    and copyed deafault code for haccess in it :

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

    It looks like it works ok now… IS it really ok like this? Is there a problem now for search engines or something like that ?

    Thanks a lot…

    Yep – that looks good.
    As long as you still have the original permalink structure, no problems for search engines…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘htaccess. get it back to default ?’ is closed to new replies.