Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 28 Feb 2017, 05:09
Zachariah's Avatar
Zachariah Zachariah is offline
 
Join Date: Feb 2002
Location: Canoga Park, CA
[fixed] htaccess and 2 plus domains

I wanted to run some ideas by the community and seek some advice on setup and settings. On a shared host plan there are 2 domains on the same package (max 10). I was thinking of changing the file layout to redirect requests to subfolders. It seems less messy on the FTP side as the account approaches 10 domains with their own file structure and content.

Current Cpanel layout:
  • Doamin1.com is the main domain.
  • Domain2.com is a add-on domain (max 10)

Current file locations were setup:
  • domain1.com => /public_html
  • domain2.com => /public_html/site2

Desired layout of file structure:
  • .htaccess => /public_html
  • domain1.com => /public_html/site1
  • domain2.com => /public_html/site2

Future as domains are added:
  • domain3.com => /public_html/site3
  • domain4.com => /public_html/site4
  • domain5.com => /public_html/site5
  • domain6.com => /public_html/site6
  • domain7.com => /public_html/site7
  • domain8.com => /public_html/site8


Are there any htaccess configurations that come to mind that could make this workout ?

Thank You.

--------------- Added 28 Feb 2017 at 21:25 ---------------

It was quite easy once you think about it.

Point all domains to the web accounts single public web folder via CPanel domain tools.
  • site1.com => /public_html
  • site2.com => /public_html


Create a .htaccess file in /public_html that will push requests to the correct subfolders where each website is contained.

EX:
  • site1.com => /public_html/site1
  • site2.com => /public_html/site2



Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This can be done repetitively to add more domains to the server.
__________________
http://www.szone.us |

Facebook | My:Hacks @ vBulletin.org

Last edited by Zachariah; 28 Feb 2017 at 21:32. Reason: added answer
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 14:17.

Layout Options | Width: Wide Color: