Adding a variable prefix to wordpress urls
-
Hi,
I have a blog running which is installed as a sub directory, ie
www.mydomain.com/blog
– however the main website is now expanding to include localised version accessed via a sub directory, eg:www.mydomain.com/us
,www.mydomain.com/eu
etc…As such when a user is viewing one of these subdirectory website I need them to be able to view the blog posts via this sub-directory. Please note, the posts are NOT translated I just need the links to work, without changing the original links.
For example I need:
www.mydomain.com/blog/my-post
to work but also for
www.mydomain.com/us/blog/my-post
to point to the same post and maybe so that I can pick up the ‘us’ part in my theme/templates.
I have tried various rewrite rules in both the .htaccess in the root as well as the .htacccess in the sub-directory and whilst the links DO go to the blog, the return the WordPress 404 so the full request is not recognised
- This topic was modified 5 years, 3 months ago by .
- This topic was modified 5 years, 3 months ago by . Reason: Moved to Fixing WordPress, this is not a Developing with WordPress topic
The page I need help with: [log in to see the link]
- The topic ‘Adding a variable prefix to wordpress urls’ is closed to new replies.