1 year ago

#377868

test-img

Dan

Redirecting website to subdirectory, while retaining index.php file in parent directory to allow access to site archive

I have two versions of a website: the old version uses wordpress for the front end, pages, display etc, whereas the new version does not.

The old site is in the public_html/ folder and is launched from the index.php wordpress file

The new site is in a subdirectory (let's call it public_html/newsite/) and it has its own index.php file.

I'd like the new site to display by default, but have the option of linking back to the old site as an archive.

I have tried editing the .htaccess directory index to prioritize index.html over index.php, and created a new index.html file in the main public_html/ folder which redirects to the new site subdirectory using a simple meta refresh tag.

This works to redirect the site, but even if I explicitly link back to the index.php file in old site parent directory, it loads the index.html file instead

I cannot change the name of the parent directory (old site) index.php because it messes up the wordpress architecture.

Suggestions would be much appreciated.

wordpress

.htaccess

web-hosting

0 Answers

Your Answer

Accepted video resources