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
https://forums.phpfreaks.com/topic/221630-make-subdomain-point-to-folder/
Share on other sites

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.