Moving a hosted domain to CGI space
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Moving a hosted domain to CGI space
Moving a hosted domain to CGI space
19-11-2011 12:38 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I have created a bulletin board using phpBB3 in my CGI space which I want to link to from the domain but the address, http://ccgi.force9username etc etc is ugly and reveals more than I would want.
I presume I should point the domain at the CGI space and move all of the domain's files into it alongside the3 bulletin board filesbut I can't see how as 'htdocs' is hard wired into the domain location.
Any help would be greatly appreciated!
Re: Moving a hosted domain to CGI space
20-11-2011 1:42 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Also don't forget the essential step of raising a ticket to request to 'change the CGI service on your domain to basic'.
Re: Moving a hosted domain to CGI space
23-11-2011 10:05 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
As an aside, is there a way to avoid my Force9 username being shown in the address bar when the site is accessed? I'm seeing http://www.DOMAINNAME/~FORCE9USERNAME/phpBB3/viewforum.php etc etc
Re: Moving a hosted domain to CGI space
23-11-2011 10:41 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: digital is there a way to avoid my Force9 username being shown in the address bar when the site is accessed? I'm seeing http://www.DOMAINNAME/~FORCE9USERNAME/phpBB3/viewforum.php etc etc
For an explanation of why that's happening, see here. You may need to add the trailing-slash fix suggested there to the rewrite section (after RewriteEngine on) in the .htaccess file of your home folder. If you have .htaccess files containing rewrites at levels below the home folder then see here for a fix. I'm not familiar with phpBB, but if there is a site-url setting somewhere in the prefs, you may have to take the /~username out of that - some packages trip the glitch during setup.
Gabe
Re: Moving a hosted domain to CGI space
25-11-2011 8:25 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
The .htaccess file I've found in the root folder of my CGI space contains...
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ $1/ [R,L]
The .htaccess file I've found in the phpBB3 folder contains...
#
# Uncomment the statement below if you want to make use of
# HTTP authentication and it does not already work.
# This could be required if you are for example using PHP via Apache CGI.
#
#<IfModule mod_rewrite.c>
#RewriteEngine on
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#</IfModule>
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
<Files "common.php">
Order Allow,Deny
Deny from All
</Files>
I've added...
RewriteEngine on
RewriteCond %{HTTP_HOST} ^ccgi\.MYDOMAINNAME\.force9\.net$ [NC]
RewriteCond %{REQUEST_URI} !^/~MYDOMAINNAME/folder/
RewriteRule (.*) /folder/$1
to both but am still seeing ~MYDOMAINNAME in the address bar if the URL is entered without a trailing / (I've changed \.plus\.com in one of the posts I read to \.force9\.net as I've got a Force9 account and the address is cshell.force9.net).
I'd be really grateful if someone could put me out of my misery by telling me exactly what change(s) I need to make.
TIA
Re: Moving a hosted domain to CGI space
25-11-2011 9:54 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Gabe
Re: Moving a hosted domain to CGI space
26-11-2011 12:34 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: digital ... to both but am still seeing ~MYDOMAINNAME in the address bar if the URL is entered without a trailing / (I've changed \.plus\.com in one of the posts I read to \.force9\.net as I've got a Force9 account and the address is cshell.force9.net).
The highlighted text should be \.force9\.co\.uk for Force9. The condition would never match as it stands.
Re: Moving a hosted domain to CGI space
26-11-2011 1:28 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
General -> Server configuration -> server settings -> Force server URL settings
General -> Server configuration -> server settings -> domain name
but I'm guessing. If it can't be fixed by rewrite or in settings, then you may need to fix certain rogue variables manually or with a wrapper.
Gabe
Re: Moving a hosted domain to CGI space
27-11-2011 2:08 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
During installation the automatically determined Script path (under Server settings) was shown as /~username/phpBB3 - I removed /~username from that to leave /phpBB3. However post installation /~username still appeared on the address line.
When I accessed the Administration Control Panel I noticed Server settings -> Force server URL settings (mentioned by Gabe) was set to "No". The text explains this means the overrides will be ignored. So changed that to "Yes" (with Script path /phpBB3) and saved the changes. That removed /~username from the address line.

I think I could have set Force server URL settings to "Yes" during installation but wasn't sure whether that was necessary at that time.
I haven't modified the .htaccess file that installs with phpBB3 in directory /phpBB3. I do have a 'missing trailing slash' fix in my root .htaccess and that fixes browsing to http://domain-name/phpBB3 (without the slash) without causing /~username to appear.
David
Re: Moving a hosted domain to CGI space
27-11-2011 1:26 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Gabe
Re: Moving a hosted domain to CGI space
28-11-2011 12:50 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Unfortunately, I'm still getting the ~username in the address bar despite making the control panel changes suggested by David. Clearly, I'm going wrong somewhere: perhaps I've screwed something up as I've made the (multiple) changes.
My .htaccess file in the CGI root folder (I've renamed the 'phpBB3' folder to 'forum') reads:
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ $1/ [R,L]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^ccgi\.USERNAME\.force9\.co\.uk$ [NC]
RewriteCond %{REQUEST_URI} !^/~USERNAME/forum/
RewriteRule (.*) /folder/$1
The file was uploaded as an ASCII file and permissions set to 644
The .htaccess file in the 'forum' folder reads:
#
# Uncomment the statement below if you want to make use of
# HTTP authentication and it does not already work.
# This could be required if you are for example using PHP via Apache CGI.
#
#<IfModule mod_rewrite.c>
#RewriteEngine on
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#</IfModule>
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
<Files "common.php">
Order Allow,Deny
Deny from All
</Files>
Permissions are set to 644 and the file was uploaded as ASCII.
Further help would be gratefully received, but I'm ready to give up and would understand if that was the feeling all round!
Re: Moving a hosted domain to CGI space
28-11-2011 1:55 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ $1/ [R,L]
RewriteCond %{HTTP_HOST} ^(www\.)?yourdomain\.co\.uk$ [NC]
RewriteCond %{REQUEST_URI} !^/~USERNAME/forum/
RewriteRule (.*) /forum/$1
changing "yourdomain" to your actual domain, but you only need to use the last three lines if you really want your domain to point straight at your forum with no /forum in the url. Otherwise, omit the last three lines.
If that doesn't fix it then presumably there's still a ~username lurking in one of the forum settings.
Gabe
Re: Moving a hosted domain to CGI space
28-11-2011 2:48 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I've tried it with Force server URL settings set to both "Yes" and "No".
Looks like, as you say, there's something lurking elsewhere.
Re: Moving a hosted domain to CGI space
28-11-2011 5:32 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Apart from relocating "RewriteEngine On" to the beginning of the file where it needs to be my root .htaccess is similar to your original. My domain redirects to a different folder but I don't have a leading / on the last redirect, i.e. I would use
RewriteRule (.*) forum/$1
I'm not sure if that would make a difference - as usual the voodoo of .htaccess coming into play.
The .htaccess in my phpBB3 folder is identical to yours. My .htaccess files have permissions 640 but that shouldn't make a difference.
I take it you have set Script path to /forum (without /~username)?
David
Re: Moving a hosted domain to CGI space
28-11-2011 6:09 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
The domain is hosted within its own folder, 'domainfolder', at the root of my CGI space and I access it as www.domain.info. The hosting in the CGI space was set up as:
Additional DNS records (Advanced)
Left field Type Pri Right field
www cname ccgi.force9.net.
The forum is within its own folder, 'forum', also at the root of my CGI space, and I'm trying to access it as www.domain.info/forum.
If I use the form www.domain.info/forum I see ~username appear in the address bar.
If I use the form www.domain.info/forum/ I don't see the ~username which is how I want it to be whether the trailing / is entered or not.
I have set Script path to /forum and tried it with Force server URL settings set to both "Yes" and "No" but this has made no difference. It's currently set to "No".
I have also set permissions on the .htaccess files to 640 and this, also, has had no effect.
Sadly, removing the leading / on the last redirect hasn't worked either.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Moving a hosted domain to CGI space