0

My individual WP site is installed in a sub-directory (e.g., example.com/wordpress) and I would like visitors to be able to view it from BOTH the root directory (example.com) AND the sub-directory (example.com/wordpress). I followed the instructions on Codex and now the root works, but the sub-directory returns a 404 error. Is it possible to have both URLs return the full site?

3 Answers 3

0

Installing Wordpress inside a sub-directory is kind of problematic. Yes, you could modify your .htaccess in order to show your Wordpress site on both the root folder and the sub-directory. However, most likely you will run intro troubles later on.

Best suggestion is to move your Wordpress installation to the root folder.

0

You could create a redirect in your root directory. If somebody visites the root (www.example.com) he get's redirected to the subdirectory (www.example.com/wordpress)

Create a simple index.html file and place:

<meta http-equiv="refresh" content="0; url=http://example.com/wordpress" /><br>

Note: Place it in the head section.

See: this post

0

I may have found an answer. After completing the instructions in the Codex document, I went to the WP dashboard > Settings > General, I reset the Site Address (URL) back to example.com/wordpress. Now, the index.php file in the root directory continues to route traffic to the sub-directory and the /wordpress/index.php handles traffic directed at it.

I'm a little nervous because the solution doesn't match the instructions in Codex to point the Site Address (URL) to the root directory. Is there any reason not to leave my site operating in this way?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.