Make site root and folders outside of phpbb3 install use phpbb error pages

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
Jedis
Registered User
Posts: 75
Joined: Wed Sep 22, 2010 2:38 am

Make site root and folders outside of phpbb3 install use phpbb error pages

Post by Jedis »

Hello,

I have phpBB3 in a sub-directory named forums. When you visit the site root, it properly redirects to /forums. However, I would like to make use of the phpBB error pages, such as 404, etc., outside of the /forums directory.

Is there a way to do this by editing the site root's .htaccess file? Right now, I am using custom error pages, but don't want to maintain them to update the standalone CSS as I switch between phpBB versions and styles. I'd like to remove the ErrorDocument stuff and have it use the routing in the /forums directory.

Current site root .htaccess:

Code: Select all

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Options -Indexes
ErrorDocument 403 /customerrors/403.html
ErrorDocument 401 /customerrors/401.html
ErrorDocument 500 /customerrors/500.html
ErrorDocument 400 /customerrors/400.html
ErrorDocument 404 /customerrors/404.html
What do I need to migrate/copy? I tried copying some of the contents of /forums/.htaccess up a level, and updated any file references to /forums/filename.php. The site was loading all plain text with no html, with no error document in site.

Thanks!
Post Reply

Return to “phpBB Custom Coding”