cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution

Create Subdomain Pointing to a Folder for a Test Environment?

I'm building a pretty vanilla website for a friend, and I'm totally overhauling everything about his current site. My dev build is local to my mac - but I'd like to setup a subdoman like, test.whatever.com or something, that I could point at a folder on his current site. I've seen lots of talk about doing it via a subdomain and a few rules in the Htacces file? But I've tried multiple different options and have come up dry every time. Currently, I'm getting a pageok error when I try to open test.whatever.com. 

 

I've created an a record for the test subdomain - and pointed at the same IP address for my whatever domain. (Is that right?) And I have used the following code in my HTAccess file for my whatever domain - pointing at my mockup directory:

 

#subdomain.domain.com will map to the folder {root}/mockup/
RewriteCond %{HTTP:Host} ^(?:test\.whatever\.com)?$
RewriteCond %{REQUEST_URI} !^/mockup/
RewriteRule ^(.*) mockup/$1 [NC,L,NS]

 

What am I missing? Is this even the right direction?

Thanks in advance, I really appreciate it!

Taylor

1 ACCEPTED SOLUTION
Super User IV

@Taylor_Holmes 

 

Assuming this is a cPanel you should be able to map the subdomain to the folder so you don't have to do anything with the .htaccess file

I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community

View solution in original post

3 REPLIES 3
Super User IV

@Taylor_Holmes 

 

Assuming this is a cPanel you should be able to map the subdomain to the folder so you don't have to do anything with the .htaccess file

I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community

View solution in original post

Oh?

where would one do this subdomain routing in cPanel? I'll start looking now... but thanks for the tip regardless. 

 

Taylor

Oh my good lord that was easy. Thanks so much!