when i try my webpage address with https, page shows only files in the private_html folder not public_html. but my website runs in the public_html. for example i use an index.html file (including forwarder script) and when you type https://alirezah.net it redirects to http://alirezah.net. how can i fix it? I wanna use cloudflare ssl service but this happens. I tried to edit htaccess but it doesn't help
Asked
Active
Viewed 5,435 times
2 Answers
6
If your website is hosted on Directadmin, then follow these steps:
- Log in to your DirectAdmin control panel
- Click on Domain Setup
- Click on the domain name you wish to change this for
- Choose the
Use a symbolic link from private_html to public_html - allows for same data in http and https
checkbox. - Note the warning message - anything in private_html will be removed, so be sure you do not have content left here that you want to keep.
- Accept the warning notice and your now pointing you are private_html directory to the public_html directory.

R.
- 2,818
- 26
- 37
-
Thanks. it worked. is there any way to make website always run by https? for e.g. i like my website be redirected from http:// alirezah.net to https:// alirezah.net – Alireza Feb 07 '16 at 16:50
-
@Steven http://stackoverflow.com/a/6847810/811922 may help. btw,please don't forget to accept the answer and vote up. Thanks – R. Feb 12 '16 at 15:32
0
If your website is installed in private_html
it will be deleted using this function. If you want to keep your website installed in private html and also redirect http to https, then you need to create a .htaccess
file in public_html
with the following contents:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule .* https://example.com/%{REQUEST_URI} [R,L]

James Coyle
- 9,922
- 1
- 40
- 48

Martin M.
- 1
- 1