Forum Moderators: phranque
Would the following file be correct for the Mod file? Should I save it as an htaccess file and put it in the directory which will house my subdomain files?
RewriteEngine On
RewriteCond %{HTTP_HOST} ^subdomain.domain.com$ [NC]
RewriteCond %{REQUEST_URL}!^/subdomain/
RewriteRule (.*) /subdomain/$1 [L]
I already use htaccess files to password protect several folders on my main domain. I would not want this new htaccess file to interfere with those password protected folders or with the htaccess file for a 404 ErrorDocument which I put in my domain root.
Thank you in advance for any help you can give me.
Welcome to WebmasterWorld [webmasterworld.com]!
Your tech support person used "loose" language. I am sure he meant to say, "Add a mod_rewrite rule to your existing .htaccess file in your web root (top-level) directory to rewrite the subdomain to a subdirectory."
There is no such thing as a "Mod file" - you just need to add the code in the thread that wilderness cited (or something similar) into your existing top-level .htaccess file.
HTH,
Jim