By spottedpuddle on
hello,
i'm busy setting up drupal 5.11 + ubercart in the directory mydomain.com/beta
will i run into problems when changing the directory mydomain.com?
i.e can i simply move all the files up one directory?
i read in the forum about changing the .htaccess file if the installation url changes. or not?
if so, how?
ThanksInAdvance
:-)
Comments
Moving around drupal should
Moving around drupal should not be a problem. I have done that a couple of times my self. You can just have to copy the files and update $base_url value in sites/default/settings.php file and update Rewritebase value in the .htaccess file.
It is possible to have some
It is possible to have some problems, but nothing hard to fix. After moving all the files up check your files and temp directory settings in Drupal to make sure that they are correct. Test if your file uploading works correctly. If you have URLs and image links manually entered in the content, which contain the beta directory, you will need to fix them as well.
Generally, when working on a dev site it is smart to set up a subdomain for accessing that site (such as beta.example.com), so that you don't have to deal with changed internal paths later.
Yes... many problems. If
Yes... many problems.
If your internal links are as they should be, Eg. /beta/sites/default/files/image01.jpg
then you will have to change them all to: /sites/default/files/image01.jpg
You should develop in a proper subdomain Eg. beta.domain.com
Internal links should start with /sites Eg. /sites/default/files/image01.jpg
So a link will be: beta.domain.com/sites/default/files/image01.jpg
Moved to root it would be: domain.com/sites/default/files/image01.jpg
Do it this way, so that your site can change domain in the future, or be placed in any subdomain.
thanks - will set up subdomain now
i will set up beta.mydomain while still easily possible.
many thanks for all the quick replies
stunning forum!
Another option
How to install Drupal in a subfolder and have it show up as the root folder: http://drupial.com/content/install-drupal-subfolder.
This is smart, but I
This is smart, but I wouldn't go there if I had any other choice. It is much better to do that by pointing the domain to the directory you want, using cpanel, if your hosting plan allows it.
Complicated .htaccess techniques are fragile and hard to debug if you need to make any changes later.
> It is much better to do
> It is much better to do that by pointing the domain to the directory you want,
> using cpanel, if your hosting plan allows it.
The redirecting methods work for the front page, but as soon as you browse off that,
the subfolder (or the subdomain folder) will display in the url.
The htaccess script from drupial actually removes the folder from the url.
I'm using an edited version of this method to hide the fact that my main site is
also in a subdomain, and so far I haven't met any bugs or problems with it. If it
does cause problems, there is no reason why I wouldn't still be able to move the
main site into root if I had to in the future.
But as you say, the best situation by far is to develop in a sub domain and then
move to root, so no htaccess jiggery-pokery is necessary.
I thought so too, but I gave it a go
and that .htaccess script has worked a treat for me. I'm certainly no Apache expert, but I've found it easy enough to customise the URL and folder in the script without any problems (touch wood).
It's clearly not for everyone but if you want some flexibility, it's a neat solution. It's particularly useful for a multi-site setup, involving different versions of Drupal or even another system altogether.