How do I set this type of subdomain in linode? foo.bar.com to bar.com/foo? Bar.com is via namecheap and is pointed at my linode.

1 Answer 1


Create a subdomain foo.bar.com via your control panel or do it manually on your Linode server. Then, set your DNS at Namecheap to point to your server IP when someone request foo.bar.com.

In the public_html of foo.bar.com on your Linode server, you can create an .htaccess file:

Redirect 301 http://bar.com/foo

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.