Old forum

JDoo
User w
User w
Posts: 8
Joined: Wed Jan 15, 2025 7:49 pm

Old forum

Post by JDoo »

We had an old forum installed under /forum
now we have a new forum installed under forum.domain.com subdomain
now we cant access to old forum, because the always loads the new forum
how can we reach the old forum?
thank you
User avatar
axew3
w3all User
w3all User
Posts: 3032
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Old forum

Post by axew3 »

It is strange that it happen if mydomain.com exists , if you do not change
the .htaccess into your old phpBB or somehow you have another server directive somewhere that redirect all requests to the new.
OR
When a subdomain (like forum.domain.com) is created, many hosting panels (like cPanel or DirectAdmin) automatically create a folder with that same name inside the root directory. If the server is configured to treat ://domain.com and forum.domain.com as the same "Document Root," the browser will always serve the "newest" configuration or redirect based on the primary domain's rules.

Using cPanel or a specific web server like Apache?
JDoo
User w
User w
Posts: 8
Joined: Wed Jan 15, 2025 7:49 pm

Re: Old forum

Post by JDoo »

so what should o do for let the old /forum install appears and not the new subdomain forum. Apache.
User avatar
axew3
w3all User
w3all User
Posts: 3032
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Old forum

Post by axew3 »

1. Subdomain "Manage Redirection"
Even if the files are in different folders, cPanel has a built-in "Redirection" feature for subdomains that works independently of the .htaccess file you see in the folder.

What to check: Go to cPanel > Subdomains.
Look for: Find forum.domain.com in the list. Check the "Redirection" column.
The Fix: If it says it is redirecting to the main domain or a specific URL, click Manage Redirection and disable it.

2. Document Root Mismatch
cPanel might be "confused" if the subdomain's Document Root is pointing to the /public_html/forum directory, even if you think the files are elsewhere.

What to check: Go to cPanel > Domains (or Subdomains in older versions).
Look for: The "Document Root" path listed next to forum.domain.com.
The Fix: Ensure the path for the subdomain is unique (e.g., /public_html/new-forum-dir) and the path for the old forum remains /public_html/forum.

3. The "Main" .htaccess
Check the .htaccess file in the root folder (public_html/), not just the one inside /forum. cPanel often adds its own redirect rules at the very bottom of the main root file when you use the "Redirects" interface.

The Fix: Open the cPanel File Manager, enable Show Hidden Files, and look for any RewriteCond or RewriteRule in the root .htaccess that mentions "forum".

4. Apache Cache/Cookies
If you recently changed these settings, Apache or your browser might have cached the 301 (Permanent) redirect.

The Fix: Try accessing the old forum via an Incognito/Private window. If it works there, you just need to clear your browser cache.

If you put this into an htaccess into the root of the domain yoursite.com (not into the sub.domain)
(change domain .com /forum/ with your values)

Code: Select all

RewriteEngine On

# 1. STOP: If the request is for the /forum/ folder, do nothing and stop processing rules

RewriteCond %{REQUEST_URI} ^/forum/ [NC]
RewriteRule ^ - [L]

# 2. Prevent the main domain from redirecting /forum requests to the subdomain
# (Only if you have an existing rule that does this)
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com$ [NC]
RewriteCond %{REQUEST_URI} ^/forum/ [NC]
RewriteRule ^(.*)$ /forum/$1 [L]
it then works?
Post Reply