Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Domain Name Extensions And....


UncleSteve

Recommended Posts

Some people may not know, but depending on the web hosting package you have, you can add (pre) extension names to your domain name. So for www.mymaindomainname .com you can add an extension to it, like www.extension-name.mymaindomainname .com. Then from your control panel, you can set up a re-direction to direct your extended domain name to a particular page on your website (or others for that matter).

 

With the above process, the URL shown in the address bar will be whatever the extended domain name has been direct to, something like http:// www. mymaindomainname .com/redirectedpage.htm. I was wondering if its possible to have the extended domain name shown in the address bar, something like http:// www. extension-name.mymaindomainname .com/redirectedpage.htm or am I way off what is possible?

 

Thanks in advance for any help and comments :)

____________________________________________________________________

____________________________________________________________________

Link to comment
Share on other sites

Setting up a sub-domain (extension-name.mymaindomainname .com) on CPanel is quite easy. I did post a thread in the Tips and Tricks section for adding pages to s sub-directory (mymaindomainname .com/extension-name/). This might be able to be hacked to make it possible to add osCommerce pages to your sub-domain also. The main part to hack would be the changes near the top of the page such as;

 

chdir('/home/***/public_html/');

require('includes/application_top.php');

 

require(DIR_WS_LANGUAGES . $language . '/faq/' . FILENAME_PRIVACY);

 

$breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_FAQ));

$breadcrumb->add(NAVBAR_TITLE_2, tep_href_link('faq/' . FILENAME_PRIVACY));

 

(This example is to put pages in a sub directory such as "faq")

 

If I am reading CPanel correcty it would be actually the same code used, at least for the chdir part;

 

chdir('/home/***/public_html/extension-name/');

require('includes/application_top.php');

 

HTH

 

Peter

Link to comment
Share on other sites

Hi,

 

There are some ways to add a sub-domain (e.g. http://MyShop.MyDomain.com) and redirect (or forward) the sub-domain to a website while keeping the sub-domain address at the Browser's URL Box (this is call frame forwarding or frame redirection.

 

1. The most easier way is to configure the DNS in the domain control panel. Almost all major domain registrars are providing frame forwarding.

 

If you are using this method, you have to use the nameservers of the registrar. Then you have to set the 'A' and MX records. This shoud take less than two minutes.

 

2. The second method I used about 10 years ago. By that time web hosting is very expensive and all domain registrars do not have frame forwarding. I assume you had already set up the sub-domain in the cPanel. In the home directory of the sub-domain, create a frame homepage with left column and right column. Set the content pages of the sub-domain showing in the right frame. Now the trick is to set the left column to "zero" width. Then the sub-domain webpages will be showing the whole browser while keeping the sub-domain address at the browser's URL Box.

 

Hope this helps.

Link to comment
Share on other sites

I've now found an even easier way to acheive my original post.

 

What you need to do, is create a subdomain in CPanel. Don't touch the forwarding aspects of adding a subdomain.

 

After doing so you will have a folder named the same as the subdomain in your public_html directory. Drop files into it. Visit subdomain.yourdomain.com and your files will be served from there. Eg a file named index.html will be served when visiting subdomain.yourdomain.com/index.html

 

I've tried the above, which was so easy and I get a similar format to what you can see actually see in the address bar of your browser for this forum :D

____________________________________________________________________

____________________________________________________________________

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...