[resolved] WordPress author page, trailing slash (1 post)

  1. webreality
    Posted 5 years ago #

    Discovered a minor-bug when using author pages in safari. If the pages are accessed without a trailing slash in the URL, Safari produces an "improper redirect" error.

    ie: /author/pagename

    This can be resolved by adding the following into the .htaccess file:
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} !(.*)/$
    RewriteRule ^(.*)$ /$1/ [L,R=301]

    Hence 301 redirecting any page without a trailing slash to the correct permalink.

Topic Closed

This topic has been closed to new replies.

About this Topic