Welcome to WebmasterWorld Guest from 54.145.208.64

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Alias: Page on Subdomain --> TLD homepage?

   
1:19 am on Mar 18, 2009 (gmt 0)

10+ Year Member



I am wondering if it is possible to alias a subdomain page to a top level domain homepage using mod rewrite. This is what I would like to do:

Have the contents of wiki.example.com/Page_To_Alias look like it would be on the top level domain, www.example.com

12:06 pm on Mar 18, 2009 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Yes, it's possible, but it creates a duplicate-content issue. More info on duplicate-content and the problems it causes fills our Google forum...

RewriteCond can be used to check the requested subdomain in the HTTP_HOST variable, and execute the rule based on that being "wiki". I don't advise it.

Jim

8:56 pm on Mar 18, 2009 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



You could, however, advertise that short link to users and set up a 301 redirect so that when people request that URL they are redirected to the real location of the content. With a 301 redirect, there would not be a Duplicate Content issue.
9:35 pm on Mar 18, 2009 (gmt 0)

10+ Year Member



Would it just be easier to put the index.php file on the top level domain, (put it in www.example.com/copyofwiki/ and point the index.php paths to the subdomain wiki files? Then since I only want "one" page...the root page from the wiki basically, I can 301 the whole folder to the top level domain.

I suppose that would be a good strategy?

9:41 pm on Mar 18, 2009 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



You don't want to 301 links that people click on on the pages of your site.

I don't understand what you mean by "301 the whole folder to the top level domain". You need to think about both "URLs the user sees" out on the web, and "internal paths to real files" inside the server.

They are two different things that are only 'associated' but NOT equivalent.

If you change URLs you need to redirect old URLs to new URLs.

You also need to rewrite URL requests to internal server file paths, adjusting to suit.