Forum Moderators: phranque

Message Too Old, No Replies

Convert my existing folder to a subdomain(Mod rewrite)

Convert my existing folder to a subdomain(Mod rewrite)

         

favcar

6:04 am on Aug 17, 2007 (gmt 0)

10+ Year Member



Hi,

Please help, I have an existing folder that I want to be access as a subdomain.
E.g [mydomain.com...] to [myfolder.mydomain.com....]

Please anybody?

Thanks in advance

new_seo

6:41 am on Aug 17, 2007 (gmt 0)

10+ Year Member



Hi,
Welcome to webmasterworld
You want that your folders should knows as subdomain.
I would suggest you to do 301 redirection from [mydomain.com...] to [myfolder.mydomain.com....]

favcar

6:51 am on Aug 17, 2007 (gmt 0)

10+ Year Member



Thanks for you reply new_seo, I done a redirection it redirected me to [myfolder.mydomain.com,...] but it gave me a not found page.

help me on this please. Thanks.

new_seo

7:38 am on Aug 17, 2007 (gmt 0)

10+ Year Member



[beyondink.com...]

this can help you.

jdMorgan

2:07 pm on Aug 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Unfortunately, these are only partial answers. In order to set up and use a subdomain, you must:
  • Define the subdomain (or a wild-card) in your DNS zone file, so that it points to the IP address of your server.
  • Define the subdomain (or a wild-card) in the configuration of your server, so that it points to the subdomain's subfolder in the filespace of your "account."
  • Link to the subdomain on your pages.
  • Rewrite requests for that subdomain to the subdirectory where its files are stored.
  • Optionally, redirect direct client requests for the subfolder URL back to the subdomain URL, so that the subfolder is *only* accessible to HTTP by using the subdomain URLs. This prevents duplicate-content problems.

    We have discussed this before, and there are many previous threads [google.com] here about this subject. Take a look at them to help you get started.

    Note that on some hosting accounts, you can do everything but the first and last step using the "control panel" provided by the host. Or you can do it manually by putting code into your server config file or into your main .htaccess file.

    For background information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].

    Jim

  •