Jump to content

Make subdomain point to folder


The14thGOD

Recommended Posts

For some reason our host can not point our subdomain to a folder (even though every other host I've had does it just fine...) but I don't know server set up well enough to tell them what they are missing.

 

Basically I need http://m.domain.com to point (not re-direct) to http://domain.com/m/

I also need to get whatever page they are accessing. I've tried finding htaccess rules with google but none of them seem to be working. Probably user error. One of the most promising ones i found:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^m\.domain\.com/(.*)$
RewriteRule ^(.*)$ /m/$1 [L]
##or
RewriteCond %{HTTP_HOST} m\.domain\.com/^(.*)
RewriteRule ^(.*)$ http://domain.com/%1/$1 [R=301,L]

I don't understand these all that well so I apologize for anything stupid.

 

Thanks for any and all help,

Justin

Link to comment
Share on other sites

  • 3 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.