• Just this afternoon I noticed that I was getting 404s on every page other than my homepage on one of my websites. If I changed the permalink structure to default it worked okay (apart from internal links that I guess were still set up with the old links), but I didn’t want to change to the default permalink settings.

    I kinda found a solution on an old forum post, which was to delete (rename) .htaccess and then change my permalinks which created a new .htaccess file which then worked. I then compared the two .htaccess files and the only different was that in the one that didn’t work there was an extra bit of code stuck on the end…

    RewriteEngine Off
    AuthName "wordpress"
    AuthUserFile "/home/username/.htpasswds/public_html/passwd"

    So while I have got the site working I am left thinking was that bit of code important for some reason, why was it there, and why was it messing up my site? Do I need that bit of code for some reason?

    Thanks, Mark

Viewing 2 replies - 1 through 2 (of 2 total)
  • to work permalink you need RewriteEngine On. as far as I know. good practice change your permalink to default. then delete your existing htacess file then go back and change the permalink to one you like. WP should be able to create a fresh one itself with proper code. try to set the permalink 2/3 time as you may already know.

    Thread Starter markjjkram

    (@markjjkram)

    Thanks, so that bit of code wasn’t doing anything useful?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘404s on every page other than homepage.’ is closed to new replies.