cancel
Showing results for 
Search instead for 
Did you mean: 

WordPress and ~username in URLs

catweazle9
Newbie
Posts: 6
Registered: ‎16-03-2011

WordPress and ~username in URLs

I've just created a skeleton WordPress site in my CGI space at http://ccgi.cooper9.force9.co.uk/~cooper9/wordpress/ and would prefer to not have the ~cooper9 in the URLs that appear in the browser's address bar.
However, I will shortly be transferring a domain (caldecoteplaygroup.co.uk) from fasthosts to force9 and would ultimately like the WordPress site above to appear when users enter the address http://caldecoteplaygroup.co.uk.
Will it be possible for caldecoteplaygroup.co.uk to map directly to my WordPress site at http://ccgi.cooper9.force9.co.uk/~cooper9/wordpress/ but with caldecoteplaygroup.co.uk always appearing in the address bar, i.e., I would rather our users see:
http://caldecoteplaygroup.co.uk/?page_id=9
.. rather than:
http://ccgi.cooper9.force9.co.uk/~cooper9/wordpress/?page_id=9
I've looked at previous threads and tried changing the .htaccess file in the root folder of my CGI area, but with no luck. I'm not sure if I should spend time attempting to just remove the ~cooper9 right now or wait until the domain has transferred and only then try to map the WordPress site to the domain URL.
Btw, I'm on the old plan "Broadband Your Way Option 2" - does anyone know if I can have the domain transferred into force9 and be used as my one optional £1 per month domain?
Any advice would be appreciated.
Thanks,
John.
6 REPLIES 6
catweazle9
Newbie
Posts: 6
Registered: ‎16-03-2011

Re: WordPress and ~username in URLs

It appears that leaving the domain at fasthosts should only cost £2.95 p.a., which would be cheaper than transferring it to force9.
Fasthosts apparently also provide free website forwarding with a masking feature:
Quote
you can choose to "mask" the destination website address in the browser address bar so it shows your own domain name.

http://www.fasthosts.co.uk/domains/features-pricing/web-forwarding/
Does anyone know if this "masking" capability would allow me to map caldecoteplaygroup.co.uk directly to http://ccgi.cooper9.force9.co.uk/~cooper9/wordpress/ or whether it only maps the hostname part of the URL? For example would it end up just mapping caldecoteplaygroup.co.uk to ccgi.cooper9.force9.co.uk, so the site URL displayed in the browser might then be caldecoteplaygroup.co.uk/~cooper9/wordpress ?
Thanks,
John.
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: WordPress and ~username in URLs

The problem with ~username appearing in the address bar results from what is known as the trailing-slash problem. You will find that if you enter http://ccgi.cooper9.force9.co.uk/wordpress/ in the address bar (note the trailing slash) your homepage is displayed and the content of the address bar doesn't change. However enter http://ccgi.cooper9.force9.co.uk/wordpress (without a trailing slash) and the content of the address bar changes to include the unwanted ~username.
To fix this add a .htaccess file (chmod 640) in your root folder ( / ) containing

RewriteEngine On
RewriteBase /
# Fix trailing slash problem
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ $1/ [R,L]

Next you need to reset the WordPress address and Site address shown in the WordPress Admin panel under Settings->General to remove ~username/. That should ensure ~username is removed from links on site pages.
Your questions concerning using a domain name are probably answered in this ongoing thread. I think the WordPress website explains settings needed to have WordPress in a subdirectory of the apparent blog site.
David
catweazle9
Newbie
Posts: 6
Registered: ‎16-03-2011

Re: WordPress and ~username in URLs

Many thanks, that worked.
I've also managed to update the wordpress installation so it appears to be in the root of my CGI space http://ccgi.cooper9.force9.co.uk/.
The next challenge will be updating the domain once the hosting has transferred to force9.  Smiley
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: WordPress and ~username in URLs

Looks better now. Smiley
Have you considered adopting Search Engine Friendly URLs so that (eg) yoursite/?p=31 becomes yoursite/spring-2011.html ?
David
catweazle9
Newbie
Posts: 6
Registered: ‎16-03-2011

Re: WordPress and ~username in URLs

Yes, I'll look into improving the URLs as you suggest at some stage (hopefully it can be done later) - WordPress seems to refer to these as "permalinks", but I haven't yet experimented with them.
On a separate note, do you know if I'll be able to configure the caldecoteplaygroup.co.uk domain (registered at fasthosts) to point to this CGI area? I noticed that the support page below shows that a domain can be mapped to my webspace (/htdocs) but doesn't mention how to map it to my CGI area?
http://www.plus.net/support/hosting/domains/domain_management.shtml
Also will I need a static IP address for the domain to be hosted at force9? If so, would that be possible given our residential account (Broadband Your Way, Option 2):
http://www.plus.net/support/hosting/domains/hosting_allowances.shtml
Finally, will I be able to configure the email account "contactus@caldecoteplaygroup.co.uk" as a POP3 address or perhaps have it auto-forward to her current force9 email address?
Thanks,
John.
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: WordPress and ~username in URLs

I think most of the hosting and email questions are covered in your newer thread. Just "do I need a static IP?" left. The answer is "no". Your website needs to have a static IP but already has one - the IP address of the ccgi server. Domain maps on the server direct to the correct user space.
David
David