forum/domain.com instead of http://domain.com/forum

Discussions about the phpBB3 Forum. How to get the best from this powerful script.
Note that there is no official support for phpBB3 here, a place to share more than to ask for.

Moderator: Moderators

forum/domain.com instead of http://domain.com/forum

Postby korb » Tue Oct 28, 2008 11:35 am

Exactly like that: I would like to make /forum/ to be the prefix and not the "suffix".

Is it possible by modifying htaccess? How?

Thanks for any reply
User avatar
korb
PR0
PR0
 
Posts: 89
Joined: Thu Aug 21, 2008 2:42 am
Location: Planet 3

Advertisement

Postby dcz » Sun Nov 02, 2008 12:43 pm

This cannot be done only with the .htaccess.
But it's rather easy, you'd need to create a sub domain (contact your host to know how to do this in your particular case), and then either set it to be linked to the forum/ dir or, move the content of the forum/ dir in the newly created sub domain.

Once done, you'll need to update phpBB's config accordingly for server name and script path.
The server name should now be set to the sub domain (subdomain.example.com), and the path to "/" (since phpBB would now be installed in the sub domain's root, not in "forum/").
While you'd be at it, you should make sure that the cookie domain is as well set properly, should be ".example.com" with the dot "." and without the quotes ;)

All these config update should be done either using phpMyadmin (direct edit) or, in the regular phpBB's acp, but you'd need to use the old domain path to reach it until it would be updated.
Do not forget to clear cache once done.

Another thing you should be aware of is redirecting, since you would change all your forums urls while doing so.
The easiest to do this would be if you could leave phpBB where it physically was, because this way, both example.com/forum and sub.example.com would lead to the same place, where you would be able to perform the redirect (with the www prefix redirection method n°2) and the zero duplicate in case you are using url rewriting.

Another thing to keep in mind while creating sub domains is that it's not necessarily a good thing SEO wise, it's really worth it when the main domain and the sub domain are big and active enough, it's not really good for example if your main domain is for now composed of few pages plus the forum, because it would end up to be tiny once the forum will have been transferred to the sub domain. And the new sub domain will as well be less big than the site plus the forum.
So this is something to think about.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21407
Joined: Fri Apr 28, 2006 9:03 pm

Tried but is it important?

Postby korb » Thu Nov 06, 2008 2:27 pm

Hi dcz,

Thank you for sharing this to me!

The problem is that my phpBB installation is bridged to Joomla if you remember my case.

So I already did as you said a subdomain, copied files there, OK!

So now I need a solution for the subdomain solution you explain and the bridge with Joomla.

BUT!!

The bridge asumes that I am using a folder inside Joomla root to provide user sync and authentification integration. The bridge wants to know the name of the phpBB3 installation folder like this "forum", but because I am moving it to a subdomain, I don't know how to do this...I guess I have to tell him the subdomain link:
subdomain.domain.com
as the folder?
I will try to get help on rocketwerx support forum.

Ok now what about .htaccess?

This is the htaccess code provided by the bridge developers for inserting in Joomla htaccess file:

Code: Select all
########## Begin - RokBridge - phpBB3 edition SEF Section
#
# The following rules need to be added to the Joomla! 1.5
# .htaccess file to allow the bridge to work in SEF mode.
# See also the bridge configuration.php file for details.

# Dont' use the rule below, it's needs optimisation and
# will not work correctly
# RewriteRule ^/forum/distribution/  forum/index.php [F,L]

# Place the below 4 lines in the Joomla! .htaccess file you
# can find in your Joomla! 1.5 root directory.
#
# The lines should be placed before the Joomla! Core SEF
# section.

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteRule ^/forum/ forum/index.php [L]

########## End - RokBridge - phpBB3 edition SEF Section


I think I will delete this code from Joomla htaccess, and I think it;s not ok. The rewrite rule does not generate routable links for phpBB forums. I need some assistance building this htaccess.
Code: Select all
Not Found
The requested document was not found on this server.


I tryed as suggested
example:

Code: Select all
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{HTTP_HOST} !^www\.domain\.ro$ [NC]
RewriteCond %{HTTP_HOST} !^(www|forum)\.domain\.ro$ [NC]


Thanks for any reply DCZ,
Danny
User avatar
korb
PR0
PR0
 
Posts: 89
Joined: Thu Aug 21, 2008 2:42 am
Location: Planet 3

Postby dcz » Sun Nov 09, 2008 10:00 am

Well, the simplest way of keeping the interaction between joomla and phpBB would be to install your sub domain within the folder where phpBB3 was in the main domain. This is usually easy to do, just a matter to changing the sub domain target folder (in the VHOST for dedicated server, in the control pannel for shared one providing with the option). You'd have something like :
Code: Select all
www/<=>www.example.com => joomla
www/forum/ <=> forum.example.com => phpbb3

phpBB3 could thus be reached through both -www.example.com/forum/ and forum.example.com, but this would not be a problem, since the zero dupe and the www prefix redirection would make sure that only forum.example.com is used.
Of course, this would mean that phpBB should then be installed in forum.example.com's root (eg no script path).

This way, the path from joomla to phpBB would not change and the bridge should work without any more modification than making sure you set up the cookie domain proper in both joomla and phpBB3 (eg:.example.com with the dot).

It is possible though, that you'll have to tweak joomla a bit in case it is linking to phpBB, like on a last active topic list, because it could continue to use the old domain at first for this.

But beside, everything should work.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21407
Joined: Fri Apr 28, 2006 9:03 pm

OK

Postby korb » Sun Nov 09, 2008 3:39 pm

So you suggest I should create a folder structure like a domain inside phpBB installation folder, and move the installation files and folders inside httpdocs folder?

But then, what about Joomla htaccess file. It should route to folder with a different rewrite roule.

I really have to try, I have no choice. I'll get back with news.
Danny
User avatar
korb
PR0
PR0
 
Posts: 89
Joined: Thu Aug 21, 2008 2:42 am
Location: Planet 3

Postby SeO » Sun Nov 09, 2008 3:47 pm

Following this way, phpBB would not change it's physical location, nothing to move, just the target dir of the sub domain, which have to be set up to match the current phpBB physical install dir.

This way both domain would work within the phpBB dir, but only one would be actually used within thanks to the redirections.
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm


Return to phpBB Forum

Who is online

Users browsing this forum: No registered users and 13 guests