Adding A Second Website Using .htaccess
May 8th, 2007
I just added my second domain to my PowWeb account and one thing I discovered is that my second domain is just showing my first web site’s contents. Meaning every domain that I have on my account will redirect to my first domain. Hence, I needed a .htaccess code to assign my second domain to a subfolder on my ‘htdocs’ directory. I searched the PowWeb Forums and found useful information there.
I’ve written a .htaccess code, as advised on the forum, and saved it as ‘.htaccess’ on my home/htdocs/ directory. I needed an FTP program to upload this file because OPS‘ Filemanager does not support such type of filename.
My htaccess resembles the following piece of code:
RewriteEngine On
Options +FollowSymLinks
RewriteCond %{HTTP_HOST} second-domain-name.com
RewriteCond %{REQUEST_URI} !secondwebsite/
RewriteRule ^(.*)$ secondwebsite/$1 [L]
Codes are case sensitive otherwise the second website will give you an “Internal Server Error” message when the domain is loaded.
Related Articles
Adding A Second Website Using PowWeb’s ‘Map to Subdirectory Tool’
Useful Links
PowWeb OPS: Login Page
PowWeb Forum Links
Installing a second domain
.htaccess code examples for an add’l domain


Leave a Comment
You must be logged in to post a comment.