Hi,
I'm using WHM and cPanel. My intent is so use sub-domain for each separate cPanel account and then redirect (through .htaccess or other way) to my root-domain/subfolder
example: I've created 2 cpanel accounts under WHM.
1st account: jen.example.com (domain)
2nd account: example.com (domain)
both are hosted on same IP address.
Now I want to upload files to https://jen.example.com but I want that my visitors should see the pages as https://example.com/jen
Example: https://jen.example.com/page1.html should be shown in browser as https://example.com/jen/page1.html
I've tried using .htaccess redirect:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^jen\.example\.com$
RewriteRule ^(.*) https://example.com/jen$1 [R=301,L]
It is redirecting, but litespeed giving a 500 error. Also I use wordpress install on jen.example.com, then it is redirected to example.com/jen but the sub-pages are not redirected.
Is there something setting changes I should do in cPanel account(s)?
Also Is there a need to manually create example.com/jen/ folder?
Please guide me accordingly. my host was not able to help on this!
I'm using WHM and cPanel. My intent is so use sub-domain for each separate cPanel account and then redirect (through .htaccess or other way) to my root-domain/subfolder
example: I've created 2 cpanel accounts under WHM.
1st account: jen.example.com (domain)
2nd account: example.com (domain)
both are hosted on same IP address.
Now I want to upload files to https://jen.example.com but I want that my visitors should see the pages as https://example.com/jen
Example: https://jen.example.com/page1.html should be shown in browser as https://example.com/jen/page1.html
I've tried using .htaccess redirect:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^jen\.example\.com$
RewriteRule ^(.*) https://example.com/jen$1 [R=301,L]
It is redirecting, but litespeed giving a 500 error. Also I use wordpress install on jen.example.com, then it is redirected to example.com/jen but the sub-pages are not redirected.
Is there something setting changes I should do in cPanel account(s)?
Also Is there a need to manually create example.com/jen/ folder?
Please guide me accordingly. my host was not able to help on this!