permalinks - How can I put WordPress in a directory but keep just the home page at the domain root?

admin2025-06-04  0

I look after the site(s) for a large annual event. Each year we want to archive last year's website and the last few years I've done that by making a copy of WordPress in the appropriate directory. / is the whole WP from 2016, / is the whole WP from 2017 and I'm looking at making a /2018/ copy.

Distinct archive sites are definitely what we need rather than multiple years within one WP installation. But done this way, the URLs all change at rollover time. We don't want to use 301s because the new year's site might have a URL clash with those. Maybe John Jones spoke last year and is speaking again so his bio page shouldn't redirect, for example.

So I'm thinking of starting out as I mean to go on and putting the year into all the URLs on the current year's site: with WP for this year sat in the /2019/ directory. But then the home page will be at /

I know how to install WP in a directory but use URLs from the domain root as the Codex describes.

I'm usually happy coding my own rewrites properly within WP when my themes and plugins need them. What I can't see is how I might have the home page show up at / but have all the other URLs show the directory for the year.

Put another way, I want to install WP at / with all the URLs starting / except the home page which I want at /

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748989972a315429.html

最新回复(0)