write .htaccess to 301 to redirect post url befor change permalink structure
-
Hi!
I’ve a wordpress multisite installation and I manage all the blogs.
I would like to change my permalink structure on each blog, but ,off course, without lose traffic from page already indexed.the best solution I found is this article about seo https://yoast.com/wordpress-seo-url-permalink/
they say I can add a simple code line to .htaccess
RedirectMatch 301 /\d{4}/\d{2}/\d{2}/(.*) https://example.com/$1
)It would work properly if I had a regular wp installation, but not on multisire:
infact after put the line in .htaccess and change the permalink structure in/&postname%/
I get
the post redirect on https://example.com/postname
but I need https://example.com/BLOGNAME/postnamehow could I say
/BLOGNAME/$1
in my .htaccess file???Something like:
RedirectMatch 301 /\d{4}/\d{2}/\d{2}/(.*) https://example.com/BLOGNAME/$1
cheers from Italy
- The topic ‘write .htaccess to 301 to redirect post url befor change permalink structure’ is closed to new replies.