URL change in WordPress Multisite blog
-
I have my web site on Zend Framework and blog on WordPress which is installed on a separate folder call ‘blog’ within root httpdocs folder. The website is a multilingual site and we’re using multisite virtual sub-folder wordpress installation for different language blogs.
Main site URL structure is as follows:
http://www.mydomain.com (english)
http://www.mydomain.com/fr/
http://www.mydomain.com/nl/testpage/
etc. which are handled by ZF with root .htaccess URL rewrites. For ex: all URLs outside mydomain.com/blog/ will go through ZF.Current blog URL structure is as follows:
http://www.mydomin.com/blog/
http://www.mydomin.com/blog/category/fashion/http://www.mydomin.com/blog/fr/
http://www.mydomin.com/blog/fr/category/fashion/But for the SEO purpose I now need to change the URLs as
http://www.mydomin.com/fr/blog/
http://www.mydomin.com/fr/blog/category/fashion/I’ve done lot of testing and searched online as well but couldn’t find a solution because the blog is in a subfolder and ZF Bootstrap handles the sitecode URLs such as mydomain.com/fr/.
With a htaccess update I can change any blog URL to redirect as follows:
RewriteRule ^fr/blog/(.*)$ http://www.mydomain.com/blog/fr/$1 [P]
but old URLs will continue work and links within blog cannot be changed to follow the new URL structure without considerable script updates which will be an issue when upgrading wordpress. Updating canonical tags to follow the new URL structure is also an issue since htaccess does not change that.
OR
is there any actual plugins exist which:
i) Overwrite the URL generation logic of WordPress, so that we can customise it to include our top level domain – i.e.
if WordPress itself is giving the URL as http://www.mydomain.com/blog/nl/category/fashion/
then we want to change its URL generation logic to http://www.mydomain.com/nl/blog/category/fashion/ – change the domain mapper or the URL generation logic basically.
ii) We also want to tell WordPress to use this same logic for the canonical tags.Any idea how to how to achieve the above with the current setup without going for separate blogs per language site?
Thanks in advance.
- The topic ‘URL change in WordPress Multisite blog’ is closed to new replies.