Advertisement:

Author Topic: (SOLVED) Steps for setting up the sub-domain feature.  (Read 4761 times)

x-mod

  • Newbie
  • *
  • Posts: 33
  • OsClass Forum - A friendly happy place.
(SOLVED) Steps for setting up the sub-domain feature.
« on: October 05, 2014, 07:32:50 am »
Can some of you advanced users please explain how to set up the sub-domain in steps. I'm using ver 3.4.2

So far I have set up the DNS wild card.

I'm running my own web server so the other steps should go easy.

I'm wanting to use for Sub-domain type "City based".

Thank you - X-MOD.


------------------------------------------------------------------------"UPDATE"------------------------------------------------------------------------------------------
I finally got it to work :)

The tutorial below assumes that you are using a hosting company that has mod-rewrite enabled and has given permission to the .htaccess file. As well that the OsClass instal was placed in the user root directory "www" and not www/some folder. 

1st. Edit the config.php file and modify this
Code: [Select]
define('WEB_PATH', 'http://yourwebsite.com/');To this
Code: [Select]
define('WEB_PATH', 'http://'.$_SERVER['HTTP_HOST'].'/'); on or close to line 25

2nd. Add the rewrite code
Code: [Select]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
To the ".htaccess" file which should be located in the same folder that OsClass is stored in. If you don't have a .htaccess file then you will need to create one.

3rd. Go to Permlinks. Admin--> Settings--> Permalinks. Tick the "Enable friendly urls" check box and hit save. At this point the page will refresh and you should see a demonstration on how to add the rewrite code to your .htaccess file but if you have followed the steps above then you should not have to modify the .htaccess file again.

4th. Choose sub-domain type in the admin--> Settings--> Advanced. Remember to enter your domain-name into the Host box below and do not put www before your domain-name.

Now go test it out and see if all works. As a suggestion, if you have chosen the sub-domain type to be city based then add that city just before your domain-name in the address bar as city will be the sub-domain e.g. phoenix.mysite.com
« Last Edit: October 07, 2014, 04:31:12 am by x-mod »

xgabara

  • Newbie
  • *
  • Posts: 4
Re: (SOLVED) Steps for setting up the sub-domain feature.
« Reply #1 on: July 21, 2015, 04:29:26 am »
Hi

Do you have the url to the site to check the subdomain function?

Aficionado

  • Guest
Re: (SOLVED) Steps for setting up the sub-domain feature.
« Reply #2 on: July 21, 2015, 12:58:53 pm »
Hi

Do you have the url to the site to check the subdomain function?


What exactly are you asking for ? Instead of posting here and there, please tell us exactly what you need to to and maybe we can help you out.


xgabara

  • Newbie
  • *
  • Posts: 4
Re: (SOLVED) Steps for setting up the sub-domain feature.
« Reply #3 on: July 22, 2015, 06:21:54 pm »
I am trying to find out how to configure osclass such that each user who registers can have their own custom subdomain. For example, if user Sam joins a job site myjobs.com and want to set-up an account "samsjob" - he should be able to get a subdoamin - samsjob.myjobs.com.  User can now come to samsjob.myjobs.com and post/apply for jobs.

Aficionado

  • Guest
Re: (SOLVED) Steps for setting up the sub-domain feature.
« Reply #4 on: July 22, 2015, 06:25:38 pm »
I am trying to find out how to configure osclass such that each user who registers can have their own custom subdomain. For example, if user Sam joins a job site myjobs.com and want to set-up an account "samsjob" - he should be able to get a subdoamin - samsjob.myjobs.com.  User can now come to samsjob.myjobs.com and post/apply for jobs.

Can't be done.

Subdomains work for Countries / Regions / Cities. Not for users.

Quikb.com

  • Jr. Member
  • **
  • Posts: 69
Re: (SOLVED) Steps for setting up the sub-domain feature.
« Reply #5 on: September 15, 2015, 05:24:47 am »
hi.  x-mod

it does not work for me. any other tricks is there for it other than what you have mentioned ?

after doing all configuration as mentioned by you it is showing

 This webpage is not available  help if you know the solution.

mandi007

  • Full Member
  • ***
  • Posts: 204
Re: (SOLVED) Steps for setting up the sub-domain feature.
« Reply #6 on: October 16, 2015, 08:21:24 am »
all steps followed as said sub domain working good but users cant able to post new ads.

any help for that.

Quikb.com

  • Jr. Member
  • **
  • Posts: 69
Re: (SOLVED) Steps for setting up the sub-domain feature.
« Reply #7 on: February 28, 2016, 06:01:29 pm »
hi, Mandi007

can you help me regarding this...

or anybody is here who can help me for it.


360webfirm

  • Newbie
  • *
  • Posts: 6
Re: (SOLVED) Steps for setting up the sub-domain feature.
« Reply #8 on: September 28, 2018, 12:33:56 am »
Can some of you advanced users please explain how to set up the sub-domain in steps. I'm using ver 3.4.2

So far I have set up the DNS wild card.

I'm running my own web server so the other steps should go easy.

I'm wanting to use for Sub-domain type "City based".

Thank you - X-MOD.


------------------------------------------------------------------------"UPDATE"------------------------------------------------------------------------------------------
I finally got it to work :)

The tutorial below assumes that you are using a hosting company that has mod-rewrite enabled and has given permission to the .htaccess file. As well that the OsClass instal was placed in the user root directory "www" and not www/some folder. 

1st. Edit the config.php file and modify this
Code: [Select]
define('WEB_PATH', 'http://yourwebsite.com/');To this
Code: [Select]
define('WEB_PATH', 'http://'.$_SERVER['HTTP_HOST'].'/'); on or close to line 25

2nd. Add the rewrite code
Code: [Select]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
To the ".htaccess" file which should be located in the same folder that OsClass is stored in. If you don't have a .htaccess file then you will need to create one.

3rd. Go to Permlinks. Admin--> Settings--> Permalinks. Tick the "Enable friendly urls" check box and hit save. At this point the page will refresh and you should see a demonstration on how to add the rewrite code to your .htaccess file but if you have followed the steps above then you should not have to modify the .htaccess file again.

4th. Choose sub-domain type in the admin--> Settings--> Advanced. Remember to enter your domain-name into the Host box below and do not put www before your domain-name.

Now go test it out and see if all works. As a suggestion, if you have chosen the sub-domain type to be city based then add that city just before your domain-name in the address bar as city will be the sub-domain e.g. phoenix.mysite.com

Is there any way you can assist me please? I have done all above and when I go to a region - newyork.mysite.com, it does not load. This has been very frustrating for me trying to get this to work.

Aficionado

  • Guest
Re: (SOLVED) Steps for setting up the sub-domain feature.
« Reply #9 on: September 28, 2018, 03:13:59 pm »


Is there any way you can assist me please? I have done all above and when I go to a region - newyork.mysite.com, it does not load. This has been very frustrating for me trying to get this to work.

Please do not post the very same thing in multiple and OLD topics.

Use your own topic:

https://forums.osclass.org/general-help/sub-domains-for-different-regions/msg165068/#msg165068

so you (and us) can follow.

Also "doesn't load" means nothing. Use your topic above to explain better.