Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

subdomain screwing up php-fusion

Asked Modified Viewed 4,115 times
S
swoopx
S
swoopx 10
  • Newbie, joined since
  • Contributed 5 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
asked
Newbie

I have a subdomain pointing to my forum directory but none of the links are working correctly or images. They are all trying to point to http://sub.domain.com/whatever instead of http://www.domain.com/whatever . How do you get around this?
0 replies

18 posts

S
sobe
S
sobe 10
  • Member, joined since
  • Contributed 56 posts on the community forums.
  • Started 12 threads in the forums
answered
Member

Fix this in Main Settings in the System Admin Panel.
0 replies
S
Sveinungs
S
  • Veteran Member, joined since
  • Contributed 935 posts on the community forums.
  • Started 3 threads in the forums
answered
Veteran Member

Like Sobe say, it's in the Main Settings. Type in the site URL

http://www.domain.com/

(domain.com beeing the adress to your site, but you knew that ;))
0 replies
S
swoopx
S
swoopx 10
  • Newbie, joined since
  • Contributed 5 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

it was already set, still doesn't do the trick.
0 replies
C
chbe
C
chbe 10
------------------------------------

thebasement.gryt.com
  • Member, joined since
  • Contributed 161 posts on the community forums.
  • Started 4 threads in the forums
answered
Member

How did you set up your subdomain?
0 replies
S
swoopx
S
swoopx 10
  • Newbie, joined since
  • Contributed 5 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

the subdomain is just pointing to the forum folder www/forum
0 replies
C
chbe
C
chbe 10
------------------------------------

thebasement.gryt.com
  • Member, joined since
  • Contributed 161 posts on the community forums.
  • Started 4 threads in the forums
answered
Member

On my site i have several different sub domains pointing to the same site
I have set up my subdomains by editing the zonefiles of my domains

If you use a .htaccess file you should write it like this

RewriteEngine On
Options +FollowSymlinks
RewriteBase /

# Rewrite Rule for machine.domain-name.net
RewriteCond %{HTTP_HOST} sub.domain.com$
RewriteCond %{REQUEST_URI} !folder/
RewriteRule ^(.*)$ folder/$1


Change sub.domain.com to your own
Change folder to your real folder name

Put the .htacces file in the root directory.
Edited by chbe on 08-09-2006 18:02,
0 replies
S
swoopx
S
swoopx 10
  • Newbie, joined since
  • Contributed 5 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

Quote

chbe wrote:
On my site i have several different sub domains pointing to the same site
I have set up my subdomains by editing the zonefiles of my domains

If you use a .htaccess file you should write it like this

RewriteEngine On
Options +FollowSymlinks
RewriteBase /

# Rewrite Rule for machine.domain-name.net
RewriteCond %{HTTP_HOST} sub.domain.com$
RewriteCond %{REQUEST_URI} !folder/
RewriteRule ^(.*)$ folder/$1


Change sub.domain.com to your own
Change folder to your real folder name

Put the .htacces file in the root directory.


ok, when I add that and change the folder name to forum (which is where the sub points to) I get this error

Not Found
The requested URL /forum/forum/ was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

when I leave no folder name it works like it did before so no help there.
0 replies
C
chbe
C
chbe 10
------------------------------------

thebasement.gryt.com
  • Member, joined since
  • Contributed 161 posts on the community forums.
  • Started 4 threads in the forums
answered
Member

Just so that I understand this right. Do you in the same fusion installation have one domain.com that points to the root folder and another sub.domain.com that points to the same fusion installation but to the forum folder?

I have given this some more thoughts and I think this is not possible.
sub.domain.com sees the forum folder as a root folder that means that it cant access any files outside for instance the image folder and other files. This is causing your errors.

My example before with the .htaccess file only shows how you can forward a sub domain in a folder structure. That folder though needs to have its own complete fusion installation. Sorry
0 replies
S
swoopx
S
swoopx 10
  • Newbie, joined since
  • Contributed 5 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

Quote

chbe wrote:
Just so that I understand this right. Do you in the same fusion installation have one domain.com that points to the root folder and another sub.domain.com that points to the same fusion installation but to the forum folder?

I have given this some more thoughts and I think this is not possible.
sub.domain.com sees the forum folder as a root folder that means that it cant access any files outside for instance the image folder and other files. This is causing your errors.

My example before with the .htaccess file only shows how you can forward a sub domain in a folder structure. That folder though needs to have its own complete fusion installation. Sorry


oh well =/
0 replies
K
Kymmy
K
Kymmy 10
  • Junior Member, joined since
  • Contributed 26 posts on the community forums.
  • Started 6 threads in the forums
answered
Junior Member

This question brings me onto another question.

If using multiple subdomains (say for differing fusion installations that used the same DB) and I wanted a central image store on another subdomain couldn't I just alter MAINCORE.PHP lines 79 to reflect the directory change.

Example..change:

define("IMAGES", BASEDIR."images/");


to

define("IMAGES", "http://XXX.DOMAIN.COM/images/");


Just a thought as I'm looking into this myself

Kymmy B)
Edited by Kymmy on 09-09-2006 11:14,
0 replies
C
chbe
C
chbe 10
------------------------------------

thebasement.gryt.com
  • Member, joined since
  • Contributed 161 posts on the community forums.
  • Started 4 threads in the forums
answered
Member

Hi Kymmy

This is interesting. I think that this actually would work. This way it would bee easy to have different Php-Fusion installations in different folders each under a sub.domain but sharing the same images and database. Could be in handy when you want fusion in different languages :)
Edited by chbe on 09-09-2006 12:35,
0 replies
K
Kymmy
K
Kymmy 10
  • Junior Member, joined since
  • Contributed 26 posts on the community forums.
  • Started 6 threads in the forums
answered
Junior Member

Which is exactly what my partner wants to do. She wants a front portal flash page which then leads to four sub domains (EN,FR,DE,ES). Each sub domain has it's own hard encoded language, can be set to look different and even have different themes but will each be in it's own language. Even though each subdomain is different we want the same database so that means having to have a shared images directory which again would be in it's own sub domain (data.)

Only changes I can see being needed across the board would be the following in maincore.php

images folder variable, line 79
localset variable,line 85
theme variable, line 208-212

all hard set and then possibly altering some of the forum files to point to a new attachments directory but only if attachments were turned on.

Have I missed anything??

Kymmy B)
Edited by Kymmy on 09-09-2006 13:36,
0 replies
C
chbe
C
chbe 10
------------------------------------

thebasement.gryt.com
  • Member, joined since
  • Contributed 161 posts on the community forums.
  • Started 4 threads in the forums
answered
Member

Why don’t you give it a try? You could create different user groups one for each language so that the news, articles and forum have the ability to show differently under each sub domain even if al is stored in the same database.

If the site is on one hosting account this shouldn’t be any problem. To redirect the different machine names to a folder structure you could just build on the htaccess file above and add the last three lines for every sub domain like this.

RewriteEngine On
Options +FollowSymlinks
RewriteBase /

# Rewrite Rule for eng.domain-name.net
RewriteCond %{HTTP_HOST} eng.domain.com$
RewriteCond %{REQUEST_URI} !eng/
RewriteRule ^(.*)$ eng/$1

# Rewrite Rule for fra.domain-name.net
RewriteCond %{HTTP_HOST} fra.domain.com$
RewriteCond %{REQUEST_URI} !fra/
RewriteRule ^(.*)$ fra/$1

# Rewrite Rule for ger.domain-name.net
RewriteCond %{HTTP_HOST} ger.domain.com$
RewriteCond %{REQUEST_URI} !ger/
RewriteRule ^(.*)$ ger/$1

# Rewrite Rule for spa.domain-name.net
RewriteCond %{HTTP_HOST} spa.domain.com$
RewriteCond %{REQUEST_URI} !spa/
RewriteRule ^(.*)$ spa/$1



Important is that you have set up the sub domain spa.domain.com, ger.domain.com, fra.domain.com and eng.domain.com to point to the same IP that domain.com.
Created folders called spa, ger, fra, eng to which the sub domain is redirected through the htaccess file.
0 replies
K
Kymmy
K
Kymmy 10
  • Junior Member, joined since
  • Contributed 26 posts on the community forums.
  • Started 6 threads in the forums
answered
Junior Member

Problem here is that I'm a windows person with a linux hosting system...so very easy to get me lost.

What I was going to do is to keep it all simple and put 4 copies of fusion each in it's own subdomain with the relevant changes made to each one to cope with language and the relevant common location of the images directory.

I'm gonna do a test install later today (mind you I still have to set up the sub domains and let them propogate thru the DNS) and will be quite happy to let other try it out with a few test users as I'm sure that some others might want this as well :)

Will get back to you later :)

Kymmy B)
0 replies
K
Kymmy
K
Kymmy 10
  • Junior Member, joined since
  • Contributed 26 posts on the community forums.
  • Started 6 threads in the forums
answered
Junior Member

Sub domains for data, english, french, german and spanish all set up. Will wait a few hours till they propogate through then will put 6.01.5 on each of them, make the changes and do a simple text front end with a few test users. After that will post the users on here for others to try out and to report back and possible bugs that need sorting.

Kymmy B)
Edited by Kymmy on 09-09-2006 15:48,
0 replies
K
Kymmy
K
Kymmy 10
  • Junior Member, joined since
  • Contributed 26 posts on the community forums.
  • Started 6 threads in the forums
answered
Junior Member

Chbe,

I tried the language seperation and it worked quite well. Apart from the navigation panel which of course is database set so might have to hard encode administrator/navigation.php which I'm happy to do.

I tried the images hard set but it will not work when I set a "http://xx.xx.com/", so instead I was wondering as you seem to be the HTACCESS expert can you set a HTACCESS file to point something like english.XXX.com/images to www.XXX.com/images including subdomains?? If so then that'll probably be the way to go as fusion won;t see the redirects.

Kymmy B)
0 replies
C
chbe
C
chbe 10
------------------------------------

thebasement.gryt.com
  • Member, joined since
  • Contributed 161 posts on the community forums.
  • Started 4 threads in the forums
answered
Member

Pm or post a link so I can have a look of what you have done.
0 replies
K
Kymmy
K
Kymmy 10
  • Junior Member, joined since
  • Contributed 26 posts on the community forums.
  • Started 6 threads in the forums
answered
Junior Member

Hi everyone, Just a quick update.

Chbe (our htaccess expert) says that we can;t doa redirect from/to subdomains) but suggested that instead of playing with subdomains I looked at just using seperate directories.

After a hectic time at work I finally managed to give it a go and had partial success.

Any images placed there before the split (avatars/photo galleries) worked fine when moved to the data directories. But still can;t create/upload new images.

Also the banner doesn;t seemt o work (but that ca be simply fixed)

Will have a look later at how Fusion uploads an image.

Kymmy B)

PS..thanX to Chbe for donating time and effort :)
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 18 posts
  • Votes 0 votes
  • Topic users 5 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet