Subdirectory Remap


#1

Hi Guys

What is the best way for me to achieve the following with Dreamhost?

I want:

www.example.com

to automatically redirect to:

www.example.com/subdirectory

Normally I would do this with the .htaccess file, is there a Panel method that gives me this?

Thanks


#2

Your example is of a URL redirect, not a subdirectory remap. Redirects are done in the .htaccess file. Actually mapping a URL to a different directory in the filesystem is done with the Panel, at least for shared hosting.


#3

Dreamhost has a help article on how to remap a subdirectory in their panel here https://help.dreamhost.com/hc/en-us/articles/217237707-Remapping-a-subdirectory-Remap-Sub-Dir-#How_to_remap_a_subdirectory

If you are looking to have the subdirectory become the main directory, you would just need to add the subdirectory to the web directory path in the domains settings. https://help.dreamhost.com/hc/en-us/articles/215909407-Domains-panel-overview#Web_directory

There is also the htacess method as you had mentioned earlier https://help.dreamhost.com/hc/en-us/articles/216109967-Transparently-redirect-your-root-directory-to-a-subdirectory