maena Posted June 7, 2021 Share Posted June 7, 2021 I have a subdomain on public_html : duo/If I use subdomain from Cpanel I've got: duo.maena.heliohost...I can do : maena.heliohost.us/duo/Is it possible to redirect maena.heliohost.us/duo/ into an alias like this : duo.heliohost.us/If this is possible it would be very useful !Thank you ! Quote Link to comment Share on other sites More sharing options...
Krydos Posted June 7, 2021 Share Posted June 7, 2021 You can use .htaccess to redirect people from a subdirectory to a subdomain. Post some actual subdirectory and subdomain names instead of examples and I can write some actual .htaccess code for you. Quote Link to comment Share on other sites More sharing options...
maena Posted June 7, 2021 Author Share Posted June 7, 2021 Thank you !I will check the htaccess after modification to learn how to do.Where is the htacess file located in the ftp structure ?The existing subdirectory is "duo".1. Could you please redirect maena.heliohost.us/maena/ into this : maena.heliohost.us2. Could you please redirect maena.heliohost.us/duo/ into this : duo.heliohost.us (no matter if alias 1 is not possible) Quote Link to comment Share on other sites More sharing options...
Seekier Posted June 7, 2021 Share Posted June 7, 2021 To make .htaccess visible you'll need to go Cpanel->file manager->setting and enable hidden files and if you can't still see it, then create it but it must look look like .htaccess Quote Link to comment Share on other sites More sharing options...
Krydos Posted June 7, 2021 Share Posted June 7, 2021 (edited) Put this in /home/maena/public_html/maena/.htaccess RewriteEngine On RewriteCond %{REQUEST_URI} ^/maena/ [NC] RewriteRule ^(.*)$ https://maena.heliohost.us$1 [R=301,L] Put this in /home/maena/public_html/duo/.htaccess RewriteEngine On RewriteCond %{REQUEST_URI} ^/duo/ [NC] RewriteRule ^(.*)$ https://duo.heliohost.us$1 [R=301,L] Obviously I haven't tested this so let me know if it doesn't work and we can try to figure out why. Edited June 8, 2021 by Krydos updated Quote Link to comment Share on other sites More sharing options...
maena Posted June 7, 2021 Author Share Posted June 7, 2021 Thanks for the details ! Quote Link to comment Share on other sites More sharing options...
maena Posted June 7, 2021 Author Share Posted June 7, 2021 The 2 files have been put to the 2 correct paths.However there is no success for the 2 url loading.If you have the possibility to fix the 2 aliases that would be great because I don't have the knowledge for this. Quote Link to comment Share on other sites More sharing options...
Seekier Posted June 7, 2021 Share Posted June 7, 2021 But why don't you just go to domain in Cpanel, redirect it and be done with it. Beside it will create the redirect rules code in htaccess by itself Quote Link to comment Share on other sites More sharing options...
Krydos Posted June 8, 2021 Share Posted June 8, 2021 I updated my answer above, and edited the files myself and it seems to work. If you try to go to https://maena.heliohost.us/maena/ you end up at https://maena.heliohost.us/ now. If you try to go to https://maena.heliohost.us/duo/ you end up at https://duo.heliohost.us/ now. Quote Link to comment Share on other sites More sharing options...
maena Posted June 8, 2021 Author Share Posted June 8, 2021 Thank you, the 2 redirections are OK.The redirection for duo works. But if the address is directly opened it returns "server not found".The redirection works: https://maena.heliohost.us/duo/The direct url does not work, "Server not found": https://duo.heliohost.us/ The goal of the alias is to be used as a direct address.I tried on my side but could not get it work.Could you please adapt the duo htaccess in order it to work as a direct address, so that https://duo.heliohost.us/ opens directly the page please ? Maybe this is just the htaccess not loading the default pages ? Quote Link to comment Share on other sites More sharing options...
Krydos Posted June 8, 2021 Share Posted June 8, 2021 I think the confusion is it's not duo.heliohost.us, it's duo.maena.heliohost.us. Quote Link to comment Share on other sites More sharing options...
maena Posted June 9, 2021 Author Share Posted June 9, 2021 Hi,Still: https://duo.heliohost.us/Returns : "Server not found"The folder contains an index.html that should load. (and .htaccess file that you created) Pointing it : https://duo.heliohost.us/index.htmlReturns : "Server not found" Is it possible to use directly: https://duo.heliohost.us/Where "duo" is a subdomain. Logically it requires some action on your server side, not in htaccess. Please could this problem be solved before this week-end. I just need to type : https://duo.heliohost.us/and to see the page loading. I suppose it's just a configuration on your server side.Could you please make sure that it works this time ? Subdomain: duoActually works: maena.heliohost.us/duo/KO: duo.maena.heliohost.us (subdomain is created, but url does not load it)KO: duo.heliohost.us/Goal: https://duo.heliohost.us/ Quote Link to comment Share on other sites More sharing options...
Krydos Posted June 10, 2021 Share Posted June 10, 2021 You can only have one .heliohost.us subdomain at a time on your own as your main domain. Quote Link to comment Share on other sites More sharing options...
maena Posted June 10, 2021 Author Share Posted June 10, 2021 Yes it is possible, please see :https://www.helionet.org/index/topic/40755-request-additional-subdomain-on-heliohost/?hl=subdomain Please can you escalate the topic for the subdomain duo to work like this :Goal: https://duo.heliohost.us/ Please escalate to root admin:duo.heliohost.org (or .us) must point to /home/maena/public_html/duo/ Thank you ! Quote Link to comment Share on other sites More sharing options...
wolstech Posted June 10, 2021 Share Posted June 10, 2021 Domain created. Give it a few hours and it should work assuming the .htaccess files are correct. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.