Forum

Location/category/u...
 
Notifications
Clear all

Location/category/user subdomains

8 Posts
5 Users
0 Likes
1,150 Views
Defected
(@dftd)
Posts: 614
Honorable Member Admin
Topic starter
 

Here's a quick tutorial on setting up Osclass location/category/user subdomains.
I've followed these steps on my sites and everything worked perfectly.

1. Log in to your hosting control panel (cPanel, hPanel, VestaCP, etc.)
2. Go to the subdomains section and create a new one.
3. Input "*" as subdomain name (without quotes!).
4. Login to your FTP and open config.php.
5. Change define('WEB_PATH', ' http://yourdomain.com/' ); to define('WEB_PATH', ' http://'.$_SERVER ['HTTP_HOST'].'/') ;
6. If required change " http://" to " https://".
7. Save the config.php file.
8. Log in to oc-admin.
9. Go to Settings -> Advanced.
10. Pick your subdomain type in the select box.
11. Save. That's it.

Additional notes:

If you have, for example, country subdomains (this will work for regions and cities as well), and you have a country named Croatia it's slug will be "croatia".
So the subdomain for Croatia will be "croatia.yourdomain.com".
But you want to only put the country code in the subdomain. Then go to Settings -> Locations, click on your country/region/city and replace the slug, for example, from "croatia" to "hr".

Available for custom Osclass development. www.defected.dev

 
Posted : 11/01/2020 12:27 pm
(@rusnam)
Posts: 219
Estimable Member
 

Thanks!

 
Posted : 13/01/2020 1:15 pm
Zero-Labs
(@zero-labs)
Posts: 82
Trusted Member
 

This is good stuff!

Okay, maybe spoke too soon. Looks like this change to config.php breaks Listings/Custom Fields. Have to revert back.

 
Posted : 17/01/2020 1:13 am
Defected
(@dftd)
Posts: 614
Honorable Member Admin
Topic starter
 

This is good stuff!

Okay, maybe spoke too soon. Looks like this change to config.php breaks Listings/Custom Fields. Have to revert back.

Breaks how? I will investigate. I don't have such a problem.

Available for custom Osclass development. www.defected.dev

 
Posted : 17/01/2020 12:42 pm
Zero-Labs
(@zero-labs)
Posts: 82
Trusted Member
 

When I go to edit listing, at the bottom of the page the custom fields get wiped out. Happens with Bender or Letgo theme so it must be a core issue. Maybe introduced with 3.9.0?

 
Posted : 17/01/2020 2:40 pm
Defected
(@dftd)
Posts: 614
Honorable Member Admin
Topic starter
 

[member=121]Zero-Labs[/member] I haven't got such a problem. Tried the regular stuff - clearing cache etc?

Available for custom Osclass development. www.defected.dev

 
Posted : 23/01/2020 11:49 pm
(@robot)
Posts: 1
New Member
 

im tested it in my hosting but is not workin when i enter country name is not workin

 
Posted : 07/03/2021 7:46 am
(@invisible)
Posts: 80
Estimable Member
 

Please use osclasspoint and their forums. As per my knowledge this forum's osclass fork is dead. Nobody is going to help you here. Instead ask support in an active community like Osclasspoint.

Here is the link

https://osclass-classifieds.com/

 
Posted : 07/03/2021 1:17 pm
Share: