The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
[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:
Current file locations were setup:
Desired layout of file structure:
Future as domains are added:
Are there any htaccess configurations that come to mind that could make this workout ? Thank You. --------------- Added [DATE]1488317132[/DATE] at [TIME]1488317132[/TIME] --------------- It was quite easy once you think about it. Point all domains to the web accounts single public web folder via CPanel domain tools.
Create a .htaccess file in /public_html that will push requests to the correct subfolders where each website is contained. EX:
Code:
Options +FollowSymLinks RewriteEngine on #================================================================================= # FIRST Handle the http requests first before removing the additional url junk #================================================================================= #rule for site1.com to link to site1folder directory RewriteCond %{HTTP_HOST} ^(www.)?site1.com$ RewriteCond %{REQUEST_URI} !^/public_html/site1/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /site1/$1 #rule for site2.com to link to site2folder directory. Its the same as above just with site2 URL and sub-folder RewriteCond %{HTTP_HOST} ^(www.)?site2.com$ RewriteCond %{REQUEST_URI} !^/public_html/site2/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /site2/$1 #========================================================== # SECOND Remove the additional url junk once the new url is loaded #========================================================== #rule for site1 url rewrite to remove /site1folder/index.php from the URL RewriteCond %{HTTP_HOST} ^(www.)?site1.com$ RewriteRule ^(/)?$ site1/index.php #rule for site2 url rewrite to remove /site2folder/index.php from the URL. Again its the same as above just with the site2 URL and sub folder info. RewriteCond %{HTTP_HOST} ^(www.)?site2.com$ RewriteRule ^(/)?$ site2/index.php |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|