I've just tacked on a subdirectory to my main Drupal site (http://www.sns.hackney.sch.uk) giving the new area: http://www.sns.hackney.sch.uk/carnival2010
As I still don't consider myself a Drupal pro, and need to do a relatively fast job, I'm building this new section in Dreamweaver (I know, a bit of a cop out, but I don't have time to do it another way). Something relatively simple I've not had to work out until now is the following problem:
'How can I set my site up so that someone can visit http://www.sns.hackney.sch.uk/carnival2010 and have that direct to index.html without anyone having to type that?'
A friend helped me out on this one. Apparently it depends on whether your server uses apache or not (you'll need to check this with your hosting company). Mine does, which means it's the '.htaccess' file I needed to tinker with. Drupal creates one of these files automatically in the root of your site, so for example I already had one in http://www.sns.hackney.sch.uk which you should be able to see in the cPanel for your site. (If you were to view it before uploading your site, it's a hidden file when it lives on your computer, so you'll need to set your computer to show hidden files if you want to see it there.)
Using the information on this page and this one I discovered that I needed to create a new and separate '.htaccess' file inside my 'carnival2010' folder. As it seemed a bit of a faff creating a new one of these files, I fudged it as follows:
- In the file manager in the cPanel provided by my hosts, I copied the .htaccess file that Drupal had created in the root of my site, and pasted it into the root of my 'carnival2010' folder.
- I edited this file from my file manager, deleting everything in it, and replacing the text with 'DirectoryIndex index.html'.
-That's it! Now I can just visit http://www.sns.hackney.sch.uk/carnival2010 and that loads the 'index.html' bit.
Friday, 23 April 2010
Subscribe to:
Comments (Atom)