• I’ve got a relatively new WP site using 2.0.2; it was using PermaLinks without a problem. The Rewrite Rules were in .htaccess.php in the WP root.

    I then needed to restrict access, so I wrote my own .htacess with the required rules and dropped it in the root.

    Immediately, the permalinks stopped working!!! I’ve now switched off permalinks, so everything works, but: how can I resurrect permalinks AND retain my restriction.

    When I tried to simply delete the new .htaccess, the permalinks were still broken. When I tried to restrict access by writing rules in the .htaccess.php file, the restriction did NOT work.

    Is it the case that the .htaccess.php file is ONLY used if there’s no other .htacess file in the directory?

    Can anyone help, or point me to a resource that makes this clear?

    By the way, is 666 the appropriate chmod setting for the .htacess file(s) so WP can update them automatically??

    Also (sorry!!), as long as posts have slugs, can I turn permalinks on/off/on/off etc as often as I like?

    thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Make your custom additions to the .htaccess file outside the #BEGIN/#END WordPress section.

    That particular section is ‘managed’ by WP. It should ignore anything that’s outside there. And as long as you are using the correct syntax in the .htaccess file, you should be good.

    Regards

    Thread Starter mark_l_sanders

    (@mark_l_sanders)

    But which file – is the .htaccess.php file the REAL htacess file, or simply a template…?

    Thread Starter mark_l_sanders

    (@mark_l_sanders)

    Sorted it by deleting the .htaccess.php, re-enabling permalinks and simply pasting the new htacess contents after my blocking code in .htacess.
    Now permalinks AND blocking work…

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Which htaccess?’ is closed to new replies.