I updated my websites permalinks via the admin panel, and then received a 403 error for permissions.

I found out this error is caused by the .htaccess file. When I delete the file from the ‘wordpress’ directory (which is a subdirectory in my case), the websites homepage and admin panel display fine, but every other page gives a 404 error.

This essentially means that I need to update my permalinks, but updating my permalinks generates a fresh .htaccess file which breaks the whole website. So I’m in this cycle of either having 404 errors without the .htaccess file, but 403 errors with it.

I’ve updated permissions, tried setting the permissions on a empty version of the file to 666, and the re-updating via the admin panel and nothing has worked.

I even tried creating a web.config file in the wordpress directory. Here is my currently unworking code in the two files:

.htaccess:

#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

web.config:

<?xml version=”1.0″ encoding=”UTF-8″?>
<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name=”wordpress” patternSyntax=”Wildcard”>
          <match url=”*” />
          <conditions>
            <add input=”{REQUEST_FILENAME}” matchType=”IsFile” negate=”true” />
            <add input=”{REQUEST_FILENAME}” matchType=”IsDirectory” negate=”true” />
          </conditions>
          <action type=”Rewrite” url=”index.php” />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>

 

I even included these lines in the wp-config.php file:

define('WP_HOME','http://users.aber.ac.uk/ler14/Wordpress%20implementation%201/wordpress/');
define('WP_SITEURL','http://users.aber.ac.uk/ler14/Wordpress%20implementation%201/wordpress/');

Any help would be greatly appreciated . It firstly occured when I changed the name of my top folder that the ‘wordpress’ folder was located within. I then changed the folder name that the ‘wordpress’ folder is located in back to its original name, but it seems the damage has already been done .

Read more here: WordPress 404 and 403 error after updating permalinks?


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: