(.htaccess) Mapping Multiple Domains to a different folders

Imagine if your have multiple domains with multiple sub folders and you’re using the root directory (public_html) as your main domain. Isn’t messy?

Try this tricks using your .htaccess.

  1. In root (public_html) directory, create a folders folder1 and folder2.
  2. Create .htaccess  in your public_html  directory.
  3. Paste the following rules and modify accordingly.
<IfModule mod_rewrite.c>
RewriteEngine On

# pointing domain1.com to folder1
ReWriteCond %{HTTP_HOST} domain1.com
ReWriteCond %{REQUEST_URI} !folder1/
ReWriteRule ^(.*)$ folder1/$1 [L]

# pointing domain2.com to folder2
#ReWriteCond %{HTTP_HOST} domain2.com
#ReWriteCond %{REQUEST_URI} !folder2/
#ReWriteRule ^(.*)$ folder2/$1 [L]

</IfModule>

Note: If you have working sub domains, you might need to manually point them to your index file by creating .htaccess inside your sub domain directory. If you have existing .htaccess then add this line:

RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

 

 

cPanel Logs locations

For those cPanel lovers, here’s some bunch of lists (logs locations) in case you need it!

 Email Logs

Delivery and receipt log /var/log/exim_mainlog
Incoming mail queue /var/spool/exim/input/
Log of messages rejected based on ACLS or other policies /var/log/exim_rejectlog
Unexpected/Fatal error log /var/log/exim_paniclog
IMAP, POP login attempts, transactions, fatal errors and spam scoring /var/log/maillog /var/log/messages
Mailman /usr/local/cpanel/3rdparty/mailmain/logs

 

cPanel Logs

Access logs and user actions /usr/local/cpanel/logs/access_log
Account transfers and misc. logs /var/cpanel/logs
Auditing log (account creations, deletions, etc) /var/cpanel/accounting.log
Backup logs /usr/local/cpanel/logs/cpbackup
Brute force protection (cphulkd) log /usr/local/cpanel/logs/cphulkd.log
Cpanel dnsadmin dns clustering daemon /usr/local/cpanel/logs/dnsadmin_log
Cpanel taskqueue processing daemon /usr/local/cpanel/logs/queueprocd.log
DBmapping /usr/local/cpanel/logs/setupdbmap_log
EasyApache build logs /usr/local/cpanel/logs/easy/apache/
Error log /usr/local/cpanel/logs/error_log
Installation log /var/log/cpanel
License updates and errors /usr/local/cpanel/logs/license_log
Locale database modifications /usr/local/cpanel/logs/build_locale_database_log
Login errors (CPSRVD) /usr/local/cpanel/logs/login_log
Horde /var/cpanel/horde/log/
RoundCube /var/cpanel/roundcube/log/
SquirrelMail /var/cpanel/squirrelmail/
Panic log /usr/local/cpanel/logs/panic_log
Per account bandwidth history (Cached) /var/cpanel/bandwidth.cache/{USERNAME}
Per account bandwidth history (Human Readable) /var/cpanel/bandwidth/{USERNAME}
Service status logs /var/log/chkservd.log
Tailwatch driver tailwatchd log /usr/local/cpanel/logs/tailwatch_log
Update analysis reporting /usr/local/cpanel/logs/updated_analysis/{TIMESTAMP}.log
Update (UPCP) log /var/cpanel/updatelogs/updated.{TIMESTAMP}.log
WebDisk (CPDAVD) /usr/local/cpanel/logs/cpdavd_error_log
Website statistics log /usr/local/cpanel/logs/stats_log

 

Apache Logs

Apache restarts done through cPanel and WHM /usr/local/cpanel/logs/safeapcherestart_log
Domain access logs /usr/local/apache/domlogs/{DOMAIN}
Processing of log splitting /usr/local/cpanel/logs/splitlogs_log
suPHP audit log /usr/local/apache/logs/suphp_log
Web server and CGI application error log /usr/local/apache/logs/error_log

MySql Logs

MySQL error log /var/lib/mysql/{SERVER_NAME}.err
MySQL slow query log (if enabled in my.cnf) /var/log/slowqueries

 

cPanel Access Logs

Access logs and user actions /usr/local/cpanel/logs/access_log

Microsoft Office Online for FREE

Is your document file always lost because of being corrupted by viruses and spywares?  Microsoft offers an online offices for free. It means that you can use Word, Excel, Powerpoint etc for free and save your document files online using OneDrive.

OfficecomHomeCrop780

Here’s what you’re going to do,

  1. Create your account in https://onedrive.live.com/about/en-us/
  2. After Logging in, Click New and you’ll see the following example below:

Capture

3.  You’re done and enjoy!