1

Topic: Help With punbb across multiple subdomains

Hi all, i have been developing a website with a punbb integration, till now im loving the forum, seriosly its simple to integrate and the gui is easily customizable which i love.

I have run into a bit of a problem tho.

The site im developing is going to be multilingual and each language will have its own subdomain so for example:

english: en.site.com
french: fr.site.com

ect..

I also have a .htaccess file which redirects all www.site.com requests to the equivalent en.site.com so i do not get 2 instances of english ie www and en since google will not like this.


I'm having a problem in punbb with this setup, i figured out what it is but i dunno how to solve it.

Basically when i try to post a new topic or edit something in the admin area it doesnt save. What is happening is that all the forms in the forum are sending their data to www.site.com and then the .htaccess is redirecting to the language, but the post is getting lost after the redirect.

Is there any way that i could get the forms to post to the correct subdomain? so if the forum is running under fr, the forms will post to fr and not to www

Re: Help With punbb across multiple subdomains

There is a variable $base_url that contains the full url (http://...) without trailing slash. This variable is defined in the config.php file. Seems like you have to add some logic to the config.php that will detect the original domain (for example, fr.site.com) and set $base_url to 'http://fr.site.com'.

3

Re: Help With punbb across multiple subdomains

worked like a charm smile