Help - Search - Members - Calendar
Full Version: Subdomains and .htaccess
MSFN Forums > Coding, Scripting and Servers > Server - Side Help (IIS, Apache, etc.)

   
Google Internet Forums Unattended CD/DVD Guide
4evrblu
I recently spotted a tutorial here: http://www.msfn.org/board/index.php?showtopic=19527

A great tutorial on the subject of subdomains.

I tried using the suggestion with an htaccess file that reads:

RewriteEngine On

RewriteCond %{HTTP_HOST} ^cfhealth.cfcure.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.cfhealth.cfcure.com/MT/$
RewriteRule ^(.*)$ http://www.cfcure.com/MT/cfhealth/ [L,R=301]

basically I want cfhealth.cfcure.com to be redirected to http://www.cfcure.com/MT/cfhealth/

I uploaded the .htaccess file to my www directory, and I tried the subdomain, but it failed to open, saying :: Safari can’t open the page “http://cfhealth.cfcure.com/” because it can’t find the server “cfhealth.cfcure.com”.

What did I do wrong?
tain
Sounds like you don't have a DNS entry for that subdomain. The redirect won't work if DNS never gets you there to begin with.
ZcWorld
what about Vhost .. have you tryed that ..

i dont know anything on the RewriteEngine rules .. to help there .. but i just use Vhost for my subdomains when i do testing smile.gif
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.