user983248
user983248

Reputation: 2688

404 not found on multiple wordpress installations (subfolders)

how do I need to set up the .htaccess file to correctly send 404 error pages on the following scenario

www.example.com - main site have a WP installation
www.example.com/folder-a/ - second WP installation
www.example.com/folder-b/ - third WP installation

All them share a same database (different prefix).

My question is how do I need to set up .htaccess on each installation to send a correct 404 error page.

Upvotes: 0

Views: 264

Answers (1)

user1068410
user1068410

Reputation: 90

Whilst a 404 error page does not send the visitor to the exact page they want, it does point them in the right direction and it means they are more likely to stay on your site.

Once you have your 404 page setup, all you need to do is send visitors to incorrect url’s to this page. To do this just add the following line to your .htaccess file :

ErrorDocument 404 /404.php

You can place the 404 error template anywhere you want. For example you could place all error messages in a folder called errormessages

    ErrorDocument 404 /errormessages/404.php 

You can do this for each .htaccess on each installation.

Upvotes: 1

Related Questions