Category Archives: Uncategorised

WordPress, Permalinks and Infinite Redirects

17 Aug 2010

While setting up my new site, I was testing out the nav menu, however /presentations/ and /documents/ looped without an end. It should be noted that directories with the same name existed as the page slugs (permalinks). So after changing the .htaccess to include the rewrite even if a directory exists.

#RewriteCond %{REQUEST_FILENAME} !-d

After inspecting the headers being sent I saw:

Location: presentations/
Location: presentations
Location: presentations/
Location: presentations
Location: presentations/
Location: presentations
Location: presentations/
Location: presentations
Location: presentations/
Location: presentations
Location: presentations/
Location: presentations

So after pages of irreverent Google results I came across a solution.

Solution: Add a trailing slash at the end of the permalink.

And so the problem was solved. :)