Sub-Domain Setup and/or redirection

Associate
Joined
20 May 2007
Posts
441
Hey everyone,

I just had a bit of an overhaul on my website from the old look and also tried out Drupal CMS before converting back to Wordpress.

Anyway here is the deal.

My old site treated the blog as completely separate site as it was kept in /blog/ directory and my server was set-up to treat that folder as a sub-domain.

Now I want the blog to be more integral part of my site, so I re-made the theme and while leaving wordpress in /blog/ I changed the theme of it to make use of some files (CSS, JS and includes) from the /css /js etc files.

The problem is now my sub-domain while set up to use /blog/ treats the root document as /blog/ rather than /.

So basically my question is, how can I make it so the Wordpress files can be kept in a directory nice and tidy, while using the CSS and includes etc for my main site and still make it a subdomain?

If it helps I'm on tsohost.co.uk and basically the main reason for keeping the sub-domain is to keep any SEO I have although I am rather tempted to drop that if this turns out to be a bit too hardcore.

My site is www.gauntface.co.uk - Thanks for any help in advance :-)

Matt
 
I went to blog.gauntface.co.uk and the root is "/".

I don't see what the problem is.

If you browse to gauntface.co.uk/blog then it's going to obey the folder and use "/blog/"

If you browse to blog.gauntface.co.uk then it's gonna obey the subdomain and treat it as "/".
 
ok, so just to clarify, you want blog.gauntface.co.uk/ to = gauntface.co.uk/blog/ ?

i.e. you want blog.gauntface to now goto to the new pages rather than the old?

Depending on your host's control panel setup it can be as simple as changing the directory the subdomain maps, with my host in your case I would delete the subdomain and then recreate it with the subdomain pointing to gaintface/blog.

Like with my subdomains here:

http://media.csignal.org is set up as http://csignal.org/media.csignal.org/

As you can see they both point to the same physical data. Hope that helps.
 
Skyfall thanks for the help and that sounds exactly like what I need.

But when I set the subdomain to www.gauntface.co.uk/blog/ it thinks the root is www.gauntface.co.uk/blog/ instead of www.gauntface.co.uk/

i.e. I have a CSS file at www.gauntface.co.uk/css/main.css which all my pages use but when I set the sub-domain to www.gauntface.co.uk/blog/ it looks for the file at www.gauntface.co.uk/blog/css/main.css - I'll have a play around tonight and try get the blog to do it relatively OR does anyone recommend the <base> tag? not sure how well supported it is and whether it is a recommended by the standards
 
Hmmm, I see the problem. I'm guessing it's more than just the css file you're having problems with? If not you could just do a redirect in the .htaccess file.

Never used the <base> tag personally so can't comment at all.
 
Back
Top Bottom