Modify the .htaccess file to work correctly with subdomains
- or -
Post a project like this1827
$60
- Posted:
- Proposals: 8
- Remote
- #2360658
- Awarded
Description
Experience Level: Entry
My web page generates a subdomain every time a client registers. After that, when the client enters a valid subdomain in the URL section, it must be redirected to a folder that is inside the public_html folder (where my web page is).
I managed to do the redirection and keep the URL showing just what the client typed as long as he/she types “https://” before the “subdomain.domain” part, because if it´s not typed or if “http://” is typed instead, an error page is shown.
That redirection is made using a code inside the main .htaccess file and I have a wildcard SSL installed.
So, what I need is someone to complete the code inside the .htaccess to do 2 things when the client enters the subdomain in the URL in either one of the next 3 ways:
subdomain.domain
http://subdomain.domain
https://subdomain.domain
The code must always do:
1.-The redirection to the sub folder (no error pages)
2.-The URL show https://subdomain.domain after the redirection.
Exception:
In order to keep my web page working fine, if someone types “www.domain” or just “domain”, with or without “https://” or “http://” , the web page must continue to load without problem.
I managed to do the redirection and keep the URL showing just what the client typed as long as he/she types “https://” before the “subdomain.domain” part, because if it´s not typed or if “http://” is typed instead, an error page is shown.
That redirection is made using a code inside the main .htaccess file and I have a wildcard SSL installed.
So, what I need is someone to complete the code inside the .htaccess to do 2 things when the client enters the subdomain in the URL in either one of the next 3 ways:
subdomain.domain
http://subdomain.domain
https://subdomain.domain
The code must always do:
1.-The redirection to the sub folder (no error pages)
2.-The URL show https://subdomain.domain after the redirection.
Exception:
In order to keep my web page working fine, if someone types “www.domain” or just “domain”, with or without “https://” or “http://” , the web page must continue to load without problem.
Marco M.
100% (3)Projects Completed
2
Freelancers worked with
2
Projects awarded
100%
Last project
7 Jun 2020
Mexico
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
, Can i see your website link please for better bidding ?
791073
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies