Hi, I am wondering if your solution will work for my needs. Please review my post below, and if you think your solution will help, let me know so I can dive in and ask some specific questions. Please note that when I start my drupal development, I want to have my static html site live a public_html before moving the drupal site to public_html, at which time I want to have my test drupal site accessed via a subdomain, and my live drupal site accessed via
www.example.com and located in example.com/public_html. Thanks.
I have been searching the forums here and at lunarpages, and I am in need of some assistance.
I currently have a static html site on lunarpages. It is accessed by typing
www.example.com in the address field of the browser. The pages are kept at
www.example.com/public_html. I want to keep this site live while I install, test and develop a drupal site at a subdomain called
www.tester.example.com. I then want to move the drupal site to
www.example.com/public_html, and have the site accessible by typing
www.example.com in the browser address bar. I then want to be able to test and develop changes to the drupal site at
www.tester.example.com, before moving them to the live site at
www.example.com/public_html which would be viewed by typing
www.example.com, for the home page. So basically, I want to set up a test site at
www.tester.example.com that will allow me to test changes before they are seen by the public at
www.example.com.
There are some other factors. I want to have my drupal file system download method be private, and I want to have my files folder and my images folder one level above the public_html folder for the live site. I have done this on test drupal installations, both installing into a subdomain and installing into a test directory like
www.example.com/test by setting my download method as private, and designating my files folder location as ../files in the files folder path field on the administer>>site configuration>>files system page, and placing the files folder on level above the folder that I install drupal in. So for my subdomain install the folder I install into is
www.example.com/public_html/tester meaning the location of the drupal index.php file is
www.example.com/public_html/tester/index.php, which is access via typing
www.tester.example.com into the browser, and the location of the files folder is
www.example.com/public_html/files. The location of the images folder, which holds all images including logo etc.. is, you guessed it, example.com/public_html/images.
When I move the drupal files from example.com/public_html/tester to example.com/public_html, making sure that the images and files folders are one level above public_html, the drupal site functions except that it can't find the files folder or the images folder, which are one level above public_html, just as they were one level above example.com/public_html/tester. This despite the fact that the files folder location is specified as ../files, and image links are specified as ../images. If I put the images and files folder in example.com/public_html then drupal sees the folders and all links work, but I want the folders to be private and one level above public_html when the site is live to the public in public_html. I have tried rewriting the $base_url var in settings.php to
www.example.com after I move the drupal site, which keeps the site working but the images and files folder links remain broken. I have also tried rewriting $base_url to
www.example.com/public_html, but that totally breaks the site. If I leave the $base_url commented out it is the same as rewriting it to
www.example.com.
My understanding is that using a subdomain such a tester.example.com is the best way to go to avoid broken image links when I move the test site live, and that somehow I have to create a url rewrite using a method such as described here
http://www.lunarforums.com/lunarpages_beginner_assistance/uri_rewrite_subdomains_to_single_directory-t42641.0.html , but I am not certain that this method will work, and/or exactly how to do it.
So, I am going a little crazy here. I want to set up a test environment from which I can move my drupal installation to a live environment, located at
www.example.com/public_html, seamlessly without having to edit image links. I want my files folder and my images folder to be located one level above public_html when the site is live for security reasons. How is this best accomplished, and what is neccesary. Do I need to create a symlink for the subdomain? Should I test and develop in a sub-folder like
www.example.com/public_html/tester? (probably not that, but let me know if you think it would work and how). Is anyone testing on a subdomain and pushing live seamlessly? How do you do it? Are there some rewrite rules I could use via .htaccess?
I have found similar threads at
http://drupal.org/node/169529 and
http://www.lunarforums.com/lunarpages_beginner_assistance/uri_rewrite_subdomains_to_single_directory-t42641.0.html, but I am ultimately not understanding the guidance provided there. Any help and guidance would be greatly appreciated. Thanks