redirect - Remove trailing slash in WP multisite .htaccess file -
i've created .htaccess file contains redirects 1 site part of larger wordpress multisite install.
the .htaccess content starts (necessary because same .httacess file must used multiple sites:
rewritecond %{http_host} ^mydomain.com [nc]
and contains series of rewrites, so:
rewriterule ^about-my-site$ [r=301,nc,l]
if visit mydomain.com/about-my-site
, correctly redirected mydomain.com/about
however, if visit mydomain.com/about-my-site/
(please note trailing slash), "page not found" error.
change rewriterule to
rewriterule ^about-my-site/?$ [r=301,nc,l]
Comments
Post a Comment