/ Published in: Apache

Rewrites url to appear like the additional domain appears independently hosted, however, only appropriate for a temporary web page as other pages throw an error.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?myotherdomain.com.au$ RewriteCond %{REQUEST_URI} !^/aliases/myotherdomain/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /aliases/myotherdomain/$1 RewriteCond %{HTTP_HOST} ^(www.)?myotherdomain.com.au$ RewriteRule ^(/)?$ aliases/myotherdomain/ [L]
Comments
