Main Site

FQDN to folder in aliased FQDN using htaccess

Simple method of displaying aliased FQDN to a folder in the primary web site. You have two domain names but you do not want the second name just pointing to the primary name as a domain alias! You would rather have it pointing to a folder instead.


Sample.net is an alias of sample.com


RewriteEngine on
RewriteCond %{HTTP_HOST} ^sample\.net [NC]
RewriteRule ^(.*)$ http://sample.com/services/tech-services-solutions/$1 [R=301,L]


# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress



This entry was posted in Development and tagged . Bookmark the permalink.

Comments are closed.