Osclass forums

Support forums => General help => Topic started by: Sophia_OS on March 08, 2019, 12:08:29 pm

Title: directory path
Post by: Sophia_OS on March 08, 2019, 12:08:29 pm
hey,
in my root, i have a folder called (doc) and inside 'doc' i have another folder called (osclass) and my osclass is installed in it,
i have to type mysite.com/doc/osclass to open my osclass website!
is it possible to type mysite.com/osclass to open my osclass website? any setting in htaccess?
please help me to do this thanks
Title: Re: directory path
Post by: dev101 on March 08, 2019, 03:28:42 pm
Generally, for this kind of questions you may find StackOverflow or ServerFault useful:

e.g.
https://stackoverflow.com/questions/22301752/remove-subfolder-from-wordpress-url-using-htaccess
https://stackoverflow.com/questions/6795134/htaccess-rewrite-url-remove-subdirectory
https://webmasters.stackexchange.com/questions/109881/how-to-remove-subdirectory-folders-from-the-url-using-htaccess

but there are many others / similar.

Regards
Title: Re: directory path
Post by: Dannad_ on March 08, 2019, 09:42:49 pm
let us understand....

you have a website: example www.yoursite.com .... but the osclass is instaled in www.yoursite.com/doc/osclass ?? is that right??

in "www.yoursite.com" do u have a simple website or this should be open a osclass??

we need to understand because some websites do the following :

they have a simple site located on "www.yoursite.com" ...

this site have a simple pages like  home, contact, services and more 2 link

for example: a link for forum and another for classified...

so they install a forum inside "www.yoursite.com/forum" and classified on "www.yoursite.com/class" .... so people who acess this site, can click on a link and tham it ill open the classified or forum...

do u undertand what we need to know about it?? your website should open osclass directly or the website have a link to open it ??
Title: Re: directory path
Post by: dev101 on March 08, 2019, 10:25:00 pm
Maybe it can help: if your hosting runs cPanel, go to domains and where you defined Osclass domain, you can set document root for that domain.

Alternatively, why don't you just move /osclass/ one level above and solve the problem? It's always best to use simple things, avoid 301s if not really necessary, and your server will work less for each request.
Title: Re: directory path
Post by: Sophia_OS on March 09, 2019, 02:00:51 am
let us understand....

you have a website: example www.yoursite.com .... but the osclass is instaled in www.yoursite.com/doc/osclass ?? is that right??

in "www.yoursite.com" do u have a simple website or this should be open a osclass??

we need to understand because some websites do the following :

they have a simple site located on "www.yoursite.com" ...

this site have a simple pages like  home, contact, services and more 2 link

for example: a link for forum and another for classified...

so they install a forum inside "www.yoursite.com/forum" and classified on "www.yoursite.com/class" .... so people who acess this site, can click on a link and tham it ill open the classified or forum...

do u undertand what we need to know about it?? your website should open osclass directly or the website have a link to open it ??

I couldn't find my answer there that's why i posted here
Title: Re: directory path
Post by: Sophia_OS on March 09, 2019, 02:04:33 am
Maybe it can help: if your hosting runs cPanel, go to domains and where you defined Osclass domain, you can set document root for that domain.

Alternatively, why don't you just move /osclass/ one level above and solve the problem? It's always best to use simple things, avoid 301s if not really necessary, and your server will work less for each request.

I have another website in mysite.com.
Then i have a doc folder in root and insite doc folder i have osclass folder which i have installed osclass in it.
Title: Re: directory path
Post by: dev101 on March 09, 2019, 02:09:59 am
It doesn't really matter how many sites you have, contact your hosting support, they will explain it to you and help you if you don't know.
You will, however, need to update Osclass's config.php to reflect directory change, namely constant REL_WEB_URL. cPanel/Apache (or equiv) supports multiple directories for multiple domains, as I wrote above.
Title: Re: directory path
Post by: Sophia_OS on March 09, 2019, 02:17:33 am
Maybe it can help: if your hosting runs cPanel, go to domains and where you defined Osclass domain, you can set document root for that domain.

Alternatively, why don't you just move /osclass/ one level above and solve the problem? It's always best to use simple things, avoid 301s if not really necessary, and your server will work less for each request.

I have only one domain name and one hosting. I already pointed root folder for mysite.com. we can not point more than one folder for the same domain.
Now inside root i have a folder called (doc) this folder is necessary and i can not remove it and it should be there for other reason. And inside doc folder i have a folder called (osclass) which my osclass for a reason is installed in it. So i can not move osclass folder to root or other place.
Now the url of my osclass website is (mysite.com/doc/osclass), but I'm trying to find a way to make this url for my osclass website (mysite.com/osclass). Here we have to remove (doc) from the url to make this. And i dont want this just for homepage, i want it to work for whole osclass website. Because for just osclass homepage i could easily generate url shorter. I opened this topic because im sure that its possible. As far as i know this kind of things could be done in htaccess. I googled before opening this topic but could not find my answer. I hope i could solve this with your help. Thanks
Title: Re: directory path
Post by: Sophia_OS on March 09, 2019, 02:24:56 am
It doesn't really matter how many sites you have, contact your hosting support, they will explain it to you and help you if you don't know.
You will, however, need to update Osclass's config.php to reflect directory change, namely constant REL_WEB_URL. cPanel/Apache (or equiv) supports multiple directories for multiple domains, as I wrote above.

So it will solve if i change the directory name in osclass config file? What exactly i should change? Please explain thanks
Title: Re: directory path
Post by: dev101 on March 09, 2019, 02:26:30 am
No, that's not gonna solve anything, I was telling you what to do in case you move it up one level.
Title: Re: directory path
Post by: Sophia_OS on March 09, 2019, 02:44:51 am
No, that's not gonna solve anything, I was telling you what to do in case you move it up one level.

@dev101
But i can not move any folders!
Title: Re: directory path
Post by: Sophia_OS on March 09, 2019, 02:46:26 am
I'm just trying to find a way to remove (doc) from the url!
Title: Re: directory path
Post by: dev101 on March 09, 2019, 02:53:25 am
Yes, I do understand your problem from the very first post, but I can't help you with that issue.
Title: Re: directory path
Post by: Sophia_OS on March 09, 2019, 03:31:42 am
Yes, I do understand your problem from the very first post, but I can't help you with that issue.

Thank you very much for trying!
Do you think we can find a way to fix this?
Title: Re: directory path
Post by: dev101 on March 09, 2019, 03:55:28 am
Maybe, never say never :)

So far, htaccess mods tried from SO didn't work in my test setup, and also some config.php tweaks all failed.
Title: Re: directory path
Post by: Sophia_OS on March 09, 2019, 05:04:32 am
Maybe, never say never :)

So far, htaccess mods tried from SO didn't work in my test setup, and also some config.php tweaks all failed.

Got you. Thanks
Title: Re: directory path
Post by: Sophia_OS on March 11, 2019, 02:03:06 am
 Can we do this by url mask in htaccess?