• This morning I changed the main directory name in my FTP file browser (the folder my ‘wordpress’ folder is inside) and received many 404 errors. I then updated my permalinks in the admin panel, which generated a new .htaccess file.

    I thought that would solve my problem, as suggested all over the internet. However, ever since then I’ve been in a constant battle with the .htaccess file. If I include it in the ‘wordpress’ directory, the website doesn’t display at all and comes with with a 403 error. This means I can’t access the website, not even to do administration.

    However, if I delete the .htaccess file, the websites homepage and admin panel re-appear, and every other page has 404 errors.

    I’ve tried updating permalinks to a default state via the admin panel a lot of times since I initially broken my website, but that just re-generates a new .htaccess file which breaks the website again. I’ve tried numerous fixes to the file all day, and this is the current code I have in it (the code that was last generated by updating permalink in the admin panel):

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

    Any help would be great, as I’ve spent 9 straight hours trying to fix this for an important university project, and am now at my ends wits! If I delete the .htaccess file I doomed, I keep it I’m doomed, so I’m in a pretty bad situation right now.

    Thanks.

Viewing 1 replies (of 1 total)
  • Thread Starter lewrossi

    (@lewrossi)

    I also meant to mention that I changed the folder back to its previous name. I have included this code in the wp-config.php file too, which forces the homepage and admin area to display, but may be causing problems itself?

    define('WP_HOME','https://example.com');
    define('WP_SITEURL','https://example.com');

    (Replacing the example address for my own of course)

    Thanks!

    • This reply was modified 7 years, 10 months ago by lewrossi.
Viewing 1 replies (of 1 total)
  • The topic ‘Problems with .htaccess file in wordpress and 403 errors’ is closed to new replies.