• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Moving a subdomain to a subdirectory

etherealfocus

Senior member
My company has a primary .com Wordpress website hosted with GoDaddy and we also have a web store run by Vortx at store.company.com. We'd like to move the store to company.com/store mostly for SEO purposes. Obviously we can't just cut and paste because the two sites are on different servers run by different company, but we're looking into domain forwarding and 301 redirects as possible solutions.

Questions:

1. Any other major options we should look into?
2. How difficult are each of these to implement?
3. What would be best from an SEO perspective?

It'll be my job to implement whatever we choose and I'm basically familiar with DNS operation but not a ninja at it by any means. I handle some lightweight hosting for a few small business clients. This is also a side project so I'd prefer to avoid anything overcomplicated that'll take me off my other work for more than a day or three.

Thanks guys! 🙂
 
I uploaded a test.html page on our server with the following code:

<html>
<head>
function redirect($store.domain.com)
{
// Date in the past
header("Expires: Tues, 01 Jan 2013 05:00:00 GMT");

// always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);

// HTTP/1.0
header("Pragma: no-cache");

// Set the 301 response code
header('HTTP/1.1 301 Moved Permanently');
header("Location: {$store.domain.com}");
}
redirect($store.domain.com);
</head>
<body>
<h1>you shouldn't see this</h1>
</body>
</html>

Obviously it didn't work - I just copy-pasted from http://www.websitefactors.co.uk/php/2011/05/php-redirects-302-to-301-rock-solid-solution/

Based on http://www.w3schools.com/php/func_http_header.asp it looks like the php code actually goes before the <html> tag. Does something like this look right?

<?php header('Location: store.domain.com'); ?>

Obviously I'd need the no-cache code too, but step at a time when I've got a test page to play with...
 
Back
Top